]> granicus.if.org Git - transmission/commitdiff
(trunk libT) have tr_strndup() take an ssize_t instead of an int
authorCharles Kerr <charles@transmissionbt.com>
Sun, 18 Jan 2009 15:15:41 +0000 (15:15 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Sun, 18 Jan 2009 15:15:41 +0000 (15:15 +0000)
libtransmission/utils.c
libtransmission/utils.h

index 87138471706623175b6d678b6ff2fe462241c90d..59abc0c1231f5e2718b6738a4771229b46072539 100644 (file)
@@ -637,8 +637,7 @@ tr_buildPath( const char *first_element, ... )
 ****/
 
 char*
-tr_strndup( const void * in,
-            int          len )
+tr_strndup( const void * in, ssize_t len )
 {
     char * out = NULL;
 
index 2d5da3604289ca66ff0bc7f4b346f091d88e4fd0..0e6eec9ae8aeeff0057871efb4a0078011652ad4 100644 (file)
@@ -302,7 +302,7 @@ static TR_INLINE void* tr_memdup( const void * src, int byteCount )
     ( (struct_type *) realloc ( ( mem ), ( (size_t) sizeof ( struct_type ) ) * ( ( size_t) ( n_structs ) ) ) )
 
 /** @param in is a void* so that callers can pass in both signed & unsigned without a cast */
-char* tr_strndup( const void * in, int len ) TR_GNUC_MALLOC;
+char* tr_strndup( const void * in, ssize_t len ) TR_GNUC_MALLOC;
 
 /** @param in is a void* so that callers can pass in both signed & unsigned without a cast */
 static TR_INLINE char* tr_strdup( const void * in )