Date: Wed, 20 Apr 2022 14:58:54 GMT From: =?utf-8?Q?Stefan E=C3=9Fer?= <se@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: ce700f78f7fb - main - libfetch: remove a set-but-not-uswed variable Message-ID: <202204201458.23KEwsh9053684@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=ce700f78f7fb28a252978382a1d0a66d08b6469a commit ce700f78f7fb28a252978382a1d0a66d08b6469a Author: Stefan Eßer <se@FreeBSD.org> AuthorDate: 2022-04-20 14:56:57 +0000 Commit: Stefan Eßer <se@FreeBSD.org> CommitDate: 2022-04-20 14:58:33 +0000 libfetch: remove a set-but-not-uswed variable --- lib/libfetch/http.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c index bcb089dc0fc4..c1d92d08b317 100644 --- a/lib/libfetch/http.c +++ b/lib/libfetch/http.c @@ -976,13 +976,12 @@ http_base64(const char *src) "0123456789+/"; char *str, *dst; size_t l; - int t, r; + int t; l = strlen(src); if ((str = malloc(((l + 2) / 3) * 4 + 1)) == NULL) return (NULL); dst = str; - r = 0; while (l >= 3) { t = (src[0] << 16) | (src[1] << 8) | src[2]; @@ -991,7 +990,7 @@ http_base64(const char *src) dst[2] = base64[(t >> 6) & 0x3f]; dst[3] = base64[(t >> 0) & 0x3f]; src += 3; l -= 3; - dst += 4; r += 4; + dst += 4; } switch (l) { @@ -1002,7 +1001,6 @@ http_base64(const char *src) dst[2] = base64[(t >> 6) & 0x3f]; dst[3] = '='; dst += 4; - r += 4; break; case 1: t = src[0] << 16; @@ -1010,7 +1008,6 @@ http_base64(const char *src) dst[1] = base64[(t >> 12) & 0x3f]; dst[2] = dst[3] = '='; dst += 4; - r += 4; break; case 0: break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204201458.23KEwsh9053684>