Commit 837da1e2 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Quench warnings.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1092 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 24192d72
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
* $Id$ * $Id$
*/ */
#include <sys/types.h>
#include <stdint.h>
#include "varnishapi.h"
static const char *b64 = static const char *b64 =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
...@@ -20,7 +24,7 @@ base64_init(void) ...@@ -20,7 +24,7 @@ base64_init(void)
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
i64[i] = -1; i64[i] = -1;
for (p = b64, i = 0; *p; p++, i++) for (p = b64, i = 0; *p; p++, i++)
i64[*p] = i; i64[(int)*p] = i;
i64['='] = 0; i64['='] = 0;
} }
...@@ -30,12 +34,13 @@ base64_decode(char *d, unsigned dlen, const char *s) ...@@ -30,12 +34,13 @@ base64_decode(char *d, unsigned dlen, const char *s)
unsigned u, v, l; unsigned u, v, l;
int i; int i;
u = 0;
l = 0; l = 0;
while (*s) { while (*s) {
for (v = 0; v < 4; v++) { for (v = 0; v < 4; v++) {
if (!*s) if (!*s)
break; break;
i = i64[*s++]; i = i64[(int)*s++];
if (i < 0) if (i < 0)
return (-1); return (-1);
u <<= 6; u <<= 6;
...@@ -50,7 +55,6 @@ base64_decode(char *d, unsigned dlen, const char *s) ...@@ -50,7 +55,6 @@ base64_decode(char *d, unsigned dlen, const char *s)
d++; d++;
} }
} }
printf("\n");
*d = '\0'; *d = '\0';
return (0); return (0);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment