Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/include Use array access
details: https://anonhg.NetBSD.org/src/rev/41d1a25097de
branches: trunk
changeset: 778410:41d1a25097de
user: joerg <joerg%NetBSD.org@localhost>
date: Sun Mar 25 06:54:04 2012 +0000
description:
Use array access
diffstat:
tests/include/t_bitstring.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 59bacc880540 -r 41d1a25097de tests/include/t_bitstring.c
--- a/tests/include/t_bitstring.c Sun Mar 25 05:55:07 2012 +0000
+++ b/tests/include/t_bitstring.c Sun Mar 25 06:54:04 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_bitstring.c,v 1.3 2010/11/07 17:51:19 jmmv Exp $ */
+/* $NetBSD: t_bitstring.c,v 1.4 2012/03/25 06:54:04 joerg Exp $ */
/*-
* Copyright (c) 1993, 2008, 2010 The NetBSD Foundation, Inc.
@@ -92,7 +92,7 @@
bit_set(bs, i);
(void) fprintf(file, "be: 1 0 ");
for (i=0; i < test_length; i++)
- (void) fprintf(file, "%c", *("100" + (i % 3)));
+ (void) fprintf(file, "%c", "100"[i % 3]);
(void) fprintf(file, "\nis: ");
printbits(file, bs, test_length);
@@ -101,7 +101,7 @@
bit_clear(bs, i);
(void) fprintf(file, "be: 0 3 ");
for (i=0; i < test_length; i++)
- (void) fprintf(file, "%c", *("000100" + (i % 6)));
+ (void) fprintf(file, "%c", "000100"[i % 6]);
(void) fprintf(file, "\nis: ");
printbits(file, bs, test_length);
Home |
Main Index |
Thread Index |
Old Index