diff options
Diffstat (limited to 'imap')
-rw-r--r-- | imap/src/c-client/auth_oa2.c | 10 | ||||
-rw-r--r-- | imap/src/c-client/http.c | 12 | ||||
-rw-r--r-- | imap/src/c-client/json.c | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/imap/src/c-client/auth_oa2.c b/imap/src/c-client/auth_oa2.c index 76a529eb..a636bc4a 100644 --- a/imap/src/c-client/auth_oa2.c +++ b/imap/src/c-client/auth_oa2.c @@ -44,19 +44,19 @@ char *oauth2_generate_state(void) rv[0] = '\0'; for(i = 0; i < 4; i++) - sprintf(rv + strlen(rv), "%x", random() % 256); + sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256)); sprintf(rv + strlen(rv), "%c", '-'); for(i = 0; i < 2; i++) - sprintf(rv + strlen(rv), "%x", random() % 256); + sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256)); sprintf(rv + strlen(rv), "%c", '-'); for(i = 0; i < 2; i++) - sprintf(rv + strlen(rv), "%x", random() % 256); + sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256)); sprintf(rv + strlen(rv), "%c", '-'); for(i = 0; i < 2; i++) - sprintf(rv + strlen(rv), "%x", random() % 256); + sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256)); sprintf(rv + strlen(rv), "%c", '-'); for(i = 0; i < 6; i++) - sprintf(rv + strlen(rv), "%x", random() % 256); + sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256)); rv[36] = '\0'; return cpystr(rv); } diff --git a/imap/src/c-client/http.c b/imap/src/c-client/http.c index 7d95112b..3f351959 100644 --- a/imap/src/c-client/http.c +++ b/imap/src/c-client/http.c @@ -919,11 +919,11 @@ http_post_param(char *url, HTTP_PARAM_S *param) HTTPSTREAM *stream; HTTP_PARAM_S enc_param; HTTP_REQUEST_S *http_request; - char *reply; + char *reply = NULL; int i; if(url == NULL || param == NULL || (stream = http_open(url)) == NULL) - return NULL; + return reply; http_request = http_request_get(); http_request->request = http_request_line("POST", stream->urltail, HTTP_1_1_VERSION); @@ -995,7 +995,7 @@ http_post_param2(char *url, HTTP_PARAM_S *param) char * http_get_param(char *base_url, HTTP_PARAM_S *param) { - char *url, *reply; + char *url, *reply = NIL; url = http_get_param_url(base_url, param); if(url){ @@ -1009,14 +1009,14 @@ char * http_get(char *url) { HTTP_REQUEST_S *http_request; - char *reply; + char *reply = NIL; HTTPSTREAM *stream; - if(!url) return NIL; + if(!url) return reply; stream = http_open(url); if(!stream){ fs_give((void **) &url); - return NIL; + return reply; } http_request = http_request_get(); diff --git a/imap/src/c-client/json.c b/imap/src/c-client/json.c index f6d05736..9a3e1671 100644 --- a/imap/src/c-client/json.c +++ b/imap/src/c-client/json.c @@ -335,7 +335,7 @@ json_value_parse(unsigned char **s) JSON_S * json_array_parse(unsigned char **s) { - JSON_S *j; + JSON_S *j = NIL; unsigned char *w = *s; json_skipws(w); |