diff --git a/lib/libc/string/bcmp.c b/lib/libc/string/bcmp.c --- a/lib/libc/string/bcmp.c +++ b/lib/libc/string/bcmp.c @@ -3,6 +3,10 @@ * * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. + * Copyright (c) 2023 The FreeBSD Foundation + * + * Portions of this software were developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -51,7 +55,7 @@ p2 = (char *)b2; do if (*p1++ != *p2++) - break; + return (1); while (--length); - return (length); + return (0); }