Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/regress/lib/libc/stdlib/getopt Don't compare the return valu...
details: https://anonhg.NetBSD.org/src/rev/fa78989fce56
branches: trunk
changeset: 553805:fa78989fce56
user: agc <agc%NetBSD.org@localhost>
date: Tue Oct 21 08:46:15 2003 +0000
description:
Don't compare the return value of strncmp(3) against NULL - it's an integer.
diffstat:
regress/lib/libc/stdlib/getopt/getopt.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 2fb7c55fbf29 -r fa78989fce56 regress/lib/libc/stdlib/getopt/getopt.c
--- a/regress/lib/libc/stdlib/getopt/getopt.c Tue Oct 21 08:44:04 2003 +0000
+++ b/regress/lib/libc/stdlib/getopt/getopt.c Tue Oct 21 08:46:15 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getopt.c,v 1.3 2002/11/30 03:10:53 lukem Exp $ */
+/* $NetBSD: getopt.c,v 1.4 2003/10/21 08:46:15 agc Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -85,7 +85,7 @@
fprintf(stderr, "argv[%d] = %s\n", i,
args[i]);
}
- } else if (strncmp(line, "result:", 7) == NULL) {
+ } else if (strncmp(line, "result:", 7) == 0) {
buf[0] = '\0';
optind = optreset = 1;
if (result)
Home |
Main Index |
Thread Index |
Old Index