Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/inetd Fix reverted logic when parsing server program.
details: https://anonhg.NetBSD.org/src/rev/32626876a2f9
branches: trunk
changeset: 1023226:32626876a2f9
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Mon Aug 30 08:21:12 2021 +0000
description:
Fix reverted logic when parsing server program.
Compare pointer with NULL not 0.
diffstat:
usr.sbin/inetd/inetd.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r a9094214b201 -r 32626876a2f9 usr.sbin/inetd/inetd.c
--- a/usr.sbin/inetd/inetd.c Mon Aug 30 06:27:49 2021 +0000
+++ b/usr.sbin/inetd/inetd.c Mon Aug 30 08:21:12 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inetd.c,v 1.128 2021/08/29 11:43:25 christos Exp $ */
+/* $NetBSD: inetd.c,v 1.129 2021/08/30 08:21:12 mlelstv Exp $ */
/*-
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
#if 0
static char sccsid[] = "@(#)inetd.c 8.4 (Berkeley) 4/13/94";
#else
-__RCSID("$NetBSD: inetd.c,v 1.128 2021/08/29 11:43:25 christos Exp $");
+__RCSID("$NetBSD: inetd.c,v 1.129 2021/08/30 08:21:12 mlelstv Exp $");
#endif
#endif /* not lint */
@@ -2388,7 +2388,7 @@
int
parse_server(struct servtab *sep, const char *arg){
sep->se_server = newstr(arg);
- if (strcmp(sep->se_server, "internal") == 0) {
+ if (strcmp(sep->se_server, "internal") != 0) {
sep->se_bi = NULL;
return 0;
}
@@ -2398,7 +2398,7 @@
if (bi->bi_socktype == sep->se_socktype &&
strcmp(bi->bi_service, sep->se_service) == 0)
break;
- if (bi->bi_service == 0) {
+ if (bi->bi_service == NULL) {
ERR("Internal service %s unknown",
sep->se_service);
return -1;
Home |
Main Index |
Thread Index |
Old Index