sync code with last fixes and improvements from OpenBSD

This commit is contained in:
purplerain 2023-07-20 23:56:46 +00:00
parent f57be82572
commit 58b04bcee7
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
468 changed files with 9958 additions and 7882 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: bcmp.c,v 1.13 2021/05/16 04:51:00 jsg Exp $ */
/* $OpenBSD: bcmp.c,v 1.14 2023/07/13 20:33:30 millert Exp $ */
/*
* Copyright (c) 1987 Regents of the University of California.
@ -42,12 +42,12 @@ bcmp(const void *b1, const void *b2, size_t length)
char *p1, *p2;
if (length == 0)
return(0);
return (0);
p1 = (char *)b1;
p2 = (char *)b2;
do
if (*p1++ != *p2++)
break;
return (1);
while (--length);
return(length);
return (0);
}