pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net/libfetch/files
Module Name: pkgsrc
Committed By: wiz
Date: Tue Aug 23 17:48:53 UTC 2022
Modified Files:
pkgsrc/net/libfetch/files: http.c
Log Message:
libfetch: remove unused variable
Also removed in upstream FreeBSD sources.
Fixes a clang warning/error reported by Edgar Fuß.
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 pkgsrc/net/libfetch/files/http.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/net/libfetch/files/http.c
diff -u pkgsrc/net/libfetch/files/http.c:1.41 pkgsrc/net/libfetch/files/http.c:1.42
--- pkgsrc/net/libfetch/files/http.c:1.41 Tue Aug 27 19:24:04 2019
+++ pkgsrc/net/libfetch/files/http.c Tue Aug 23 17:48:53 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: http.c,v 1.41 2019/08/27 19:24:04 joerg Exp $ */
+/* $NetBSD: http.c,v 1.42 2022/08/23 17:48:53 wiz Exp $ */
/*-
* Copyright (c) 2000-2004 Dag-Erling Co�dan Sm�rgrav
* Copyright (c) 2003 Thomas Klausner <wiz%NetBSD.org@localhost>
@@ -619,13 +619,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];
@@ -634,7 +633,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) {
@@ -645,7 +644,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;
@@ -653,7 +651,6 @@ http_base64(const char *src)
dst[1] = base64[(t >> 12) & 0x3f];
dst[2] = dst[3] = '=';
dst += 4;
- r += 4;
break;
case 0:
break;
Home |
Main Index |
Thread Index |
Old Index