aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall/misc.c
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1996-12-11 18:23:19 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1996-12-11 18:23:19 +0000
commit86767547be6d071f1ecbc24c22a4cb3832b05a67 (patch)
treeb4559797b88382d69ce7830e112c0f922eafa0ba /usr.sbin/sysinstall/misc.c
parent4963f4cd96d2963c9a6845a6886aa6fcf8995903 (diff)
downloadsrc-86767547be6d071f1ecbc24c22a4cb3832b05a67.tar.gz
src-86767547be6d071f1ecbc24c22a4cb3832b05a67.zip
Be more efficient in how we use memory (stumbled across while looking for
something else) for attributes and variables. Remove stack-stomper in sstrncpy().
Notes
Notes: svn path=/head/; revision=20331
Diffstat (limited to 'usr.sbin/sysinstall/misc.c')
-rw-r--r--usr.sbin/sysinstall/misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/misc.c b/usr.sbin/sysinstall/misc.c
index 17ce8eb37bd2..af88fe3b2d1f 100644
--- a/usr.sbin/sysinstall/misc.c
+++ b/usr.sbin/sysinstall/misc.c
@@ -1,7 +1,7 @@
/*
* Miscellaneous support routines..
*
- * $Id: misc.c,v 1.22 1996/07/09 14:28:17 jkh Exp $
+ * $Id: misc.c,v 1.23 1996/12/09 08:22:15 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -80,7 +80,7 @@ string_concat(char *one, char *two)
char *
sstrncpy(char *dst, const char *src, int size)
{
- *(dst + size) = '\0';
+ dst[size - 1] = '\0';
return strncpy(dst, src, size - 1);
}