diff options
author | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2003-07-02 22:38:55 +0000 |
---|---|---|
committer | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2003-07-02 22:38:55 +0000 |
commit | 86b5ca3b049e9ee22fa9e43a4728595e04d15a54 (patch) | |
tree | a2a830931f8160e1b56effe2d44d3f54e895a273 /sbin/mount_msdos | |
parent | d0cc8a727e3b2d10f23741a98e7f92ea50cd24f4 (diff) |
convert strncat -> strlcat
millert@ ok
Diffstat (limited to 'sbin/mount_msdos')
-rw-r--r-- | sbin/mount_msdos/mount_msdos.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/mount_msdos/mount_msdos.c b/sbin/mount_msdos/mount_msdos.c index aa1b31f7c87..13969e8e1c6 100644 --- a/sbin/mount_msdos/mount_msdos.c +++ b/sbin/mount_msdos/mount_msdos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_msdos.c,v 1.16 2003/06/11 06:22:14 deraadt Exp $ */ +/* $OpenBSD: mount_msdos.c,v 1.17 2003/07/02 22:38:53 avsm Exp $ */ /* $NetBSD: mount_msdos.c,v 1.16 1996/10/24 00:12:50 cgd Exp $ */ /* @@ -32,7 +32,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: mount_msdos.c,v 1.16 2003/06/11 06:22:14 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mount_msdos.c,v 1.17 2003/07/02 22:38:53 avsm Exp $"; #endif /* not lint */ #include <sys/cdefs.h> @@ -68,7 +68,7 @@ main(int argc, char **argv) struct msdosfs_args args; struct stat sb; int c, mntflags, set_gid, set_uid, set_mask; - char *dev, *dir, ndir[MAXPATHLEN+1]; + char *dev, *dir, ndir[MAXPATHLEN]; char *errcause; mntflags = set_gid = set_uid = set_mask = 0; @@ -122,8 +122,8 @@ main(int argc, char **argv) warnx("\"%s\" is a relative path.", dir); if (getcwd(ndir, sizeof(ndir)) == NULL) err(1, "getcwd"); - strncat(ndir, "/", sizeof(ndir) - strlen(ndir)); - strncat(ndir, dir, sizeof(ndir) - strlen(ndir)); + strlcat(ndir, "/", sizeof(ndir)); + strlcat(ndir, dir, sizeof(ndir)); dir = ndir; warnx("using \"%s\" instead.", dir); } |