Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/string PR lib/57141 - never decrement len without a...
details: https://anonhg.NetBSD.org/src/rev/7ba9ebf944f7
branches: trunk
changeset: 372814:7ba9ebf944f7
user: kre <kre%NetBSD.org@localhost>
date: Wed Dec 28 14:32:04 2022 +0000
description:
PR lib/57141 - never decrement len without actually performing a STEP.
diffstat:
lib/libc/string/swab.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 834f719de981 -r 7ba9ebf944f7 lib/libc/string/swab.c
--- a/lib/libc/string/swab.c Wed Dec 28 13:27:10 2022 +0000
+++ b/lib/libc/string/swab.c Wed Dec 28 14:32:04 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: swab.c,v 1.18 2011/01/04 17:14:07 martin Exp $ */
+/* $NetBSD: swab.c,v 1.19 2022/12/28 14:32:04 kre Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)swab.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: swab.c,v 1.18 2011/01/04 17:14:07 martin Exp $");
+__RCSID("$NetBSD: swab.c,v 1.19 2022/12/28 14:32:04 kre Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -68,8 +68,8 @@
}
/* round to multiple of 8 */
- while ((--len % 8) != 0)
- STEP;
+ while ((len % 8) != 0)
+ len--, STEP;
len /= 8;
if (len == 0)
return;
Home |
Main Index |
Thread Index |
Old Index