diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-01-30 22:19:41 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-01-30 22:19:41 +0000 |
commit | 76f896e7145ac85b354ad603794f569b20ca85c8 (patch) | |
tree | a3da57ca81cfda646587f3e62c18e63913d7d585 /src/common | |
parent | 1894e7ea01154d91c3842926a71ae32843264a24 (diff) | |
download | tor-76f896e7145ac85b354ad603794f569b20ca85c8.tar tor-76f896e7145ac85b354ad603794f569b20ca85c8.tar.gz |
r11607@catbus: nickm | 2007-01-30 17:19:27 -0500
Audit non-const char arguments; make a lot more of them const.
svn:r9466
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/compat.c | 2 | ||||
-rw-r--r-- | src/common/compat.h | 2 | ||||
-rw-r--r-- | src/common/tortls.c | 2 | ||||
-rw-r--r-- | src/common/tortls.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index 8b7867c71..6838db904 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -645,7 +645,7 @@ set_max_file_descriptors(unsigned long limit, unsigned long cap) * success. On failure, log and return -1. */ int -switch_id(char *user, char *group) +switch_id(const char *user, const char *group) { #ifndef MS_WINDOWS struct passwd *pw = NULL; diff --git a/src/common/compat.h b/src/common/compat.h index 536fd052c..358909141 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -282,7 +282,7 @@ void set_uint16(char *cp, uint16_t v) ATTR_NONNULL((1)); void set_uint32(char *cp, uint32_t v) ATTR_NONNULL((1)); int set_max_file_descriptors(unsigned long limit, unsigned long cap); -int switch_id(char *user, char *group); +int switch_id(const char *user, const char *group); #ifdef HAVE_PWD_H char *get_user_homedir(const char *username); #endif diff --git a/src/common/tortls.c b/src/common/tortls.c index b93d761b0..8238073a3 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -538,7 +538,7 @@ tor_tls_read(tor_tls_t *tls, char *cp, size_t len) * TOR_TLS_WANTREAD, or TOR_TLS_WANTWRITE. */ int -tor_tls_write(tor_tls_t *tls, char *cp, size_t n) +tor_tls_write(tor_tls_t *tls, const char *cp, size_t n) { int r, err; tor_assert(tls); diff --git a/src/common/tortls.h b/src/common/tortls.h index e2b738da4..50e798cc2 100644 --- a/src/common/tortls.h +++ b/src/common/tortls.h @@ -55,7 +55,7 @@ int tor_tls_get_peer_cert_nickname(int severity, tor_tls_t *tls, int tor_tls_verify(int severity, tor_tls_t *tls, crypto_pk_env_t **identity); int tor_tls_check_lifetime(tor_tls_t *tls, int tolerance); int tor_tls_read(tor_tls_t *tls, char *cp, size_t len); -int tor_tls_write(tor_tls_t *tls, char *cp, size_t n); +int tor_tls_write(tor_tls_t *tls, const char *cp, size_t n); int tor_tls_handshake(tor_tls_t *tls); int tor_tls_shutdown(tor_tls_t *tls); int tor_tls_get_pending_bytes(tor_tls_t *tls); |