Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/inetd - don't compare pointer with \0. in this cas...
details: https://anonhg.NetBSD.org/src/rev/46f06cb0a263
branches: trunk
changeset: 996486:46f06cb0a263
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Feb 03 12:02:22 2019 +0000
description:
- don't compare pointer with \0. in this case, *pointer is wanted,
not \0 -> NULL, as we just tested pointer, and this is wanting to
be the standard "is this string NULL or nul?" idiom.
diffstat:
usr.sbin/inetd/ipsec.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 28bdb162d38c -r 46f06cb0a263 usr.sbin/inetd/ipsec.c
--- a/usr.sbin/inetd/ipsec.c Sun Feb 03 11:59:43 2019 +0000
+++ b/usr.sbin/inetd/ipsec.c Sun Feb 03 12:02:22 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.c,v 1.4 2012/01/04 16:09:43 drochner Exp $ */
+/* $NetBSD: ipsec.c,v 1.5 2019/02/03 12:02:22 mrg Exp $ */
/*
* Copyright (C) 1999 WIDE Project.
@@ -58,7 +58,7 @@
char *p0, *p;
int error;
- if (!policy || policy == '\0')
+ if (!policy || *policy == '\0')
p0 = p = strdup("in entrust; out entrust");
else
p0 = p = strdup(policy);
Home |
Main Index |
Thread Index |
Old Index