Added
Link Here
|
1 |
--- libyahoo/libyahoo.c.orig 2007-11-12 15:12:19.000000000 +0100 |
2 |
+++ libyahoo/libyahoo.c 2007-11-12 15:13:33.000000000 +0100 |
3 |
@@ -746,15 +746,15 @@ |
4 |
static char *yahoo_urlencode(const char *instr) |
5 |
{ |
6 |
register int ipos, bpos; //input str pos., buffer pos. |
7 |
- static unsigned char *str = NULL; |
8 |
+ static char *str = NULL; |
9 |
int len = strlen(instr); |
10 |
int tmp; |
11 |
|
12 |
//attempt to reuse buffer |
13 |
if (NULL == str) |
14 |
- str = (unsigned char *) malloc(3 * len + 1); |
15 |
+ str = malloc(3 * len + 1); |
16 |
else |
17 |
- str = (unsigned char *) realloc(str, 3 * len + 1); |
18 |
+ str = realloc(str, 3 * len + 1); |
19 |
|
20 |
//malloc, realloc failed ? |
21 |
if (errno == ENOMEM) |
22 |
@@ -791,7 +791,7 @@ |
23 |
|
24 |
//free extra alloc'ed mem. |
25 |
tmp = strlen(str); |
26 |
- str = (unsigned char *) realloc(str, tmp + 1); |
27 |
+ str = realloc(str, tmp + 1); |
28 |
|
29 |
return (str); |
30 |
} |