diff options
| author | joerg <joerg@NetBSD.org> | 2012-03-25 06:54:04 +0000 |
|---|---|---|
| committer | joerg <joerg@NetBSD.org> | 2012-03-25 06:54:04 +0000 |
| commit | 3fbf80aed53b1c131659b121f09e7b8f9d69b909 (patch) | |
| tree | 01029680734029b552927b8eccea700be7267779 /tests/include | |
| parent | 4c2809aec8a55be593ba612ce44f9c208b1cfe02 (diff) | |
Use array access
Diffstat (limited to 'tests/include')
| -rw-r--r-- | tests/include/t_bitstring.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/include/t_bitstring.c b/tests/include/t_bitstring.c index 99dc2240e62..1dda3c25d55 100644 --- a/tests/include/t_bitstring.c +++ b/tests/include/t_bitstring.c @@ -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 @@ calculate_data(FILE *file, const int test_length) 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 @@ calculate_data(FILE *file, const int test_length) 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); |
