diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-10-02 19:45:26 -0700 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-10-02 19:45:26 -0700 |
commit | 8e9e2b7d9e54744cee32b3724391bf0ad04e8aff (patch) | |
tree | 6cafdc57bb8143306daf8ef8288d09754f39b451 /lib/misc.c | |
parent | 88de0c96136313e553113f69cfc6ae544a5f5954 (diff) | |
parent | 2af3e232ff468b288dd4e0dbdab1a17312d801c5 (diff) |
Merging mainline, which includes a huge msnp13 merge.
Not 100% sure about the OpenSSL merge, should double check that but I'm
currently offline.
Diffstat (limited to 'lib/misc.c')
-rw-r--r-- | lib/misc.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -307,11 +307,10 @@ void http_decode( char *s ) /* This fuction is safe, but make sure you call it safely as well! */ void http_encode( char *s ) { - char *t; + char t[strlen(s)+1]; int i, j; - t = g_strdup( s ); - + strcpy( t, s ); for( i = j = 0; t[i]; i ++, j ++ ) { /* Warning: isalnum() is locale-aware, so don't use it here! */ @@ -329,8 +328,6 @@ void http_encode( char *s ) } } s[j] = 0; - - g_free( t ); } /* Strip newlines from a string. Modifies the string passed to it. */ |