Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libc/string memmem: remove unreachable return sta...



details:   https://anonhg.NetBSD.org/src/rev/b1602b8302df
branches:  trunk
changeset: 379167:b1602b8302df
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun May 16 09:43:39 2021 +0000

description:
memmem: remove unreachable return statement

diffstat:

 common/lib/libc/string/memmem.c |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 28881a360d6d -r b1602b8302df common/lib/libc/string/memmem.c
--- a/common/lib/libc/string/memmem.c   Sun May 16 09:17:23 2021 +0000
+++ b/common/lib/libc/string/memmem.c   Sun May 16 09:43:39 2021 +0000
@@ -25,7 +25,7 @@
 #if 0
 __FBSDID("$FreeBSD: head/lib/libc/string/memmem.c 315468 2017-03-18 00:53:24Z emaste $");
 #else
-__RCSID("$NetBSD: memmem.c,v 1.3 2018/10/15 19:32:48 christos Exp $");
+__RCSID("$NetBSD: memmem.c,v 1.4 2021/05/16 09:43:39 rillig Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -63,7 +63,6 @@ static char *fourbyte_memmem(const unsig
        for (h += 4, k -= 4; k; k--, hw = hw << 8 | *h++)
                if (hw == nw) return __UNCONST(h - 4);
        return hw == nw ? __UNCONST(h - 4) : 0;
-       return 0;
 }
 
 #define MAX(a,b) ((a)>(b)?(a):(b))



Home | Main Index | Thread Index | Old Index