shithub: scc

Download patch

ref: 526c098338106cfe67e236c72f2b7763d98ba13c
parent: 4865d137aa87e8ee60c39888f7febf3bbcaa2f4b
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Aug 29 11:34:50 EDT 2018

[lib/c] Avoid signess mismatch in memchr

The cast was wrong because having a cast to (unsigned char) was
free in this case.

--- a/lib/c/memchr.c
+++ b/lib/c/memchr.c
@@ -4,7 +4,7 @@
 void *
 memchr(const void *s, int c, size_t n)
 {
-	unsigned char *bp = (char *) s;
+	unsigned char *bp = (unsigned char *) s;
 
 	while (n > 0 && *bp++ != c)
 		--n;