Module Name: src
Committed By: christos
Date: Fri Oct 8 14:44:49 UTC 2021
Modified Files:
src/bin/dd: dd_swab.c
Log Message:
PR/56443: RVP: dd conv=swab doesn't always work
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/bin/dd/dd_swab.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/dd/dd_swab.c
diff -u src/bin/dd/dd_swab.c:1.1 src/bin/dd/dd_swab.c:1.2
--- src/bin/dd/dd_swab.c:1.1 Fri Oct 4 04:57:38 2019
+++ src/bin/dd/dd_swab.c Fri Oct 8 10:44:48 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: dd_swab.c,v 1.1 2019/10/04 08:57:38 mrg Exp $ */
+/* $NetBSD: dd_swab.c,v 1.2 2021/10/08 14:44:48 christos Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)swab.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: dd_swab.c,v 1.1 2019/10/04 08:57:38 mrg Exp $");
+__RCSID("$NetBSD: dd_swab.c,v 1.2 2021/10/08 14:44:48 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -71,7 +71,7 @@ dd_swab(const void * from, void * to, ss
}
/* round to multiple of 8 */
- while ((--len % 8) != 0)
+ for (; (len % 8) != 0; --len)
STEP;
len /= 8;
if (len == 0)