summaryrefslogtreecommitdiff
path: root/libexec/rpc.rquotad/rquotad.c
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-06-11 15:18:54 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-06-11 15:18:54 +0000
commit17fdbbbbd36dd0f57381719477a4df3a9771df26 (patch)
treef5156d1d8e47c08bc274d75009b0aa67541e2fa1 /libexec/rpc.rquotad/rquotad.c
parentbbbf292a68225de030d9d9ced38e0bce00decab0 (diff)
strncpy vs strlcpy, some strlen missuse.
some other related minor cleanups, and spaces. millert@ ok
Diffstat (limited to 'libexec/rpc.rquotad/rquotad.c')
-rw-r--r--libexec/rpc.rquotad/rquotad.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libexec/rpc.rquotad/rquotad.c b/libexec/rpc.rquotad/rquotad.c
index e354ab37f12..b40080848e4 100644
--- a/libexec/rpc.rquotad/rquotad.c
+++ b/libexec/rpc.rquotad/rquotad.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rquotad.c,v 1.9 2001/02/12 07:15:46 deraadt Exp $ */
+/* $OpenBSD: rquotad.c,v 1.10 2001/06/11 15:18:51 mickey Exp $ */
/*
* by Manuel Bouyer (bouyer@ensta.fr)
*
@@ -323,8 +323,7 @@ hasquota(fs, qfnamep)
qfextension[USRQUOTA], QUOTAFILENAME);
initname = 1;
}
- strncpy(buf, fs->fs_mntops, sizeof buf);
- buf[sizeof(buf) - 1] = '\0';
+ strlcpy(buf, fs->fs_mntops, sizeof buf);
for (opt = strtok(buf, ","); opt; opt = strtok(NULL, ",")) {
if ((cp = strchr(opt, '=')))
*cp++ = '\0';