Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/user The language lawyers claim that it is invalid ...
details: https://anonhg.NetBSD.org/src/rev/399c3d4020ac
branches: trunk
changeset: 583324:399c3d4020ac
user: christos <christos%NetBSD.org@localhost>
date: Sat Jul 30 15:06:43 2005 +0000
description:
The language lawyers claim that it is invalid to test a freed pointer, so
don't!
diffstat:
usr.sbin/user/user.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (42 lines):
diff -r d0d98562539f -r 399c3d4020ac usr.sbin/user/user.c
--- a/usr.sbin/user/user.c Sat Jul 30 14:49:35 2005 +0000
+++ b/usr.sbin/user/user.c Sat Jul 30 15:06:43 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: user.c,v 1.85 2005/07/30 14:35:23 christos Exp $ */
+/* $NetBSD: user.c,v 1.86 2005/07/30 15:06:43 christos Exp $ */
/*
* Copyright (c) 1999 Alistair G. Crooks. All rights reserved.
@@ -35,7 +35,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1999 \
The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: user.c,v 1.85 2005/07/30 14:35:23 christos Exp $");
+__RCSID("$NetBSD: user.c,v 1.86 2005/07/30 15:06:43 christos Exp $");
#endif
#include <sys/types.h>
@@ -976,7 +976,7 @@
login_cap_t *lc;
if (class == NULL || *class == '\0')
- return 0;
+ return 1;
/*
* Check if /etc/login.conf exists. login_getclass() will
* return 1 due to it not existing, so not informing the
@@ -989,10 +989,11 @@
return 1;
}
- if ((lc = login_getclass(class)) != NULL)
+ if ((lc = login_getclass(class)) != NULL) {
login_close(lc);
-
- return lc != NULL;
+ return 1;
+ }
+ return 0;
}
#endif
Home |
Main Index |
Thread Index |
Old Index