summaryrefslogtreecommitdiff
path: root/usr.sbin/user
diff options
context:
space:
mode:
authorsoren <soren@NetBSD.org>2000-03-31 02:54:17 +0000
committersoren <soren@NetBSD.org>2000-03-31 02:54:17 +0000
commitae994d44aa231373dadafbc40ca4be2a8a2be98f (patch)
treecd1b8945d65d87afc3142383e92f175c9e6cacd0 /usr.sbin/user
parentcf0b47bd0e52e87718e3a0f55a6f3a3a2ca6e6ab (diff)
Use char NULs.
Diffstat (limited to 'usr.sbin/user')
-rw-r--r--usr.sbin/user/user.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/user/user.c b/usr.sbin/user/user.c
index 4b78420d0df..6c42c58ad02 100644
--- a/usr.sbin/user/user.c
+++ b/usr.sbin/user/user.c
@@ -1,4 +1,4 @@
-/* $NetBSD: user.c,v 1.13 2000/03/12 19:57:24 jlam Exp $ */
+/* $NetBSD: user.c,v 1.14 2000/03/31 02:54:17 soren Exp $ */
/*
* Copyright (c) 1999 Alistair G. Crooks. All rights reserved.
@@ -36,7 +36,7 @@
__COPYRIGHT(
"@(#) Copyright (c) 1999 \
The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: user.c,v 1.13 2000/03/12 19:57:24 jlam Exp $");
+__RCSID("$NetBSD: user.c,v 1.14 2000/03/31 02:54:17 soren Exp $");
#endif
#include <sys/types.h>
@@ -179,7 +179,7 @@ memsave(char **cpp, char *s, size_t n)
}
NEWARRAY(char, *cpp, n + 1, exit(1));
(void) memcpy(*cpp, s, n);
- (*cpp)[n] = 0;
+ (*cpp)[n] = '\0';
}
/* a replacement for system(3) */
@@ -215,7 +215,7 @@ strlcpy(char *to, char *from, size_t tosize)
fromsize = strlen(from);
n = MIN(tosize - 1, fromsize);
(void) memcpy(to, from, n);
- to[n] = 0;
+ to[n] = '\0';
return fromsize;
}
#endif
@@ -725,7 +725,7 @@ adduser(char *login, user_t *up)
expire = mktime(&tm);
}
}
- password[PasswordLength] = 0;
+ password[PasswordLength] = '\0';
if (up->u_password != (char *) NULL &&
strlen(up->u_password) == PasswordLength) {
(void) memcpy(password, up->u_password, PasswordLength);
@@ -861,7 +861,7 @@ moduser(char *login, char *newlogin, user_t *up)
expire = mktime(&tm);
}
}
- password[PasswordLength] = 0;
+ password[PasswordLength] = '\0';
if (up->u_password != (char *) NULL &&
strlen(up->u_password) == PasswordLength) {
(void) memcpy(password, up->u_password, PasswordLength);
@@ -1260,7 +1260,7 @@ userdel(int argc, char **argv)
if (u.u_preserve) {
memsave(&u.u_shell, NOLOGIN, strlen(NOLOGIN));
(void) memset(password, '*', PasswordLength);
- password[PasswordLength] = 0;
+ password[PasswordLength] = '\0';
memsave(&u.u_password, password, PasswordLength);
return moduser(argv[optind], argv[optind], &u) ? EXIT_SUCCESS : EXIT_FAILURE;
}