diff options
| author | 2012-01-12 00:30:01 +0100 | |
|---|---|---|
| committer | 2012-01-12 00:30:01 +0100 | |
| commit | 33b8dfb90ecc5b4b2559c1fb43d7b743b72bf425 (patch) | |
| tree | c64f6f780500df4e0f216d774601f5465a7339ed /src/base64.c | |
| parent | 83fa6982dfddaed93195402e2e0b7435bc707e06 (diff) | |
| download | libplist-33b8dfb90ecc5b4b2559c1fb43d7b743b72bf425.tar.gz libplist-33b8dfb90ecc5b4b2559c1fb43d7b743b72bf425.tar.bz2 | |
fix compiler warnings
Diffstat (limited to 'src/base64.c')
| -rw-r--r-- | src/base64.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/base64.c b/src/base64.c index 65c6061..e558d9e 100644 --- a/src/base64.c +++ b/src/base64.c | |||
| @@ -104,9 +104,9 @@ static int base64decode_block(unsigned char *target, const char *data, size_t da | |||
| 104 | 104 | ||
| 105 | unsigned char *base64decode(const char *buf, size_t *size) | 105 | unsigned char *base64decode(const char *buf, size_t *size) |
| 106 | { | 106 | { |
| 107 | if (!buf) return; | 107 | if (!buf) return NULL; |
| 108 | size_t len = strlen(buf); | 108 | size_t len = strlen(buf); |
| 109 | if (len <= 0) return; | 109 | if (len <= 0) return NULL; |
| 110 | unsigned char *outbuf = (unsigned char*)malloc((len/4)*3+3); | 110 | unsigned char *outbuf = (unsigned char*)malloc((len/4)*3+3); |
| 111 | 111 | ||
| 112 | unsigned char *line; | 112 | unsigned char *line; |
| @@ -114,7 +114,7 @@ unsigned char *base64decode(const char *buf, size_t *size) | |||
| 114 | 114 | ||
| 115 | line = (unsigned char*)strtok((char*)buf, "\r\n\t "); | 115 | line = (unsigned char*)strtok((char*)buf, "\r\n\t "); |
| 116 | while (line) { | 116 | while (line) { |
| 117 | p+=base64decode_block(outbuf+p, line, strlen((char*)line)); | 117 | p+=base64decode_block(outbuf+p, (const char*)line, strlen((char*)line)); |
| 118 | 118 | ||
| 119 | // get next line of base64 encoded block | 119 | // get next line of base64 encoded block |
| 120 | line = (unsigned char*)strtok(NULL, "\r\n\t "); | 120 | line = (unsigned char*)strtok(NULL, "\r\n\t "); |
