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/8fb03036eb6e
branches:  trunk
changeset: 1021198:8fb03036eb6e
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 fc2b067f1011 -r 8fb03036eb6e 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 @@
        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