summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/misc.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-12-11 18:23:19 +0000
committerjkh <jkh@FreeBSD.org>1996-12-11 18:23:19 +0000
commit17cc23f57886f93c187a29f8994632dac71ebf7b (patch)
treeb4559797b88382d69ce7830e112c0f922eafa0ba /usr.sbin/sade/misc.c
parente1e9e3aa19b00c35016cddf8a23e2b7fc0d9f4e0 (diff)
downloadFreeBSD-src-17cc23f57886f93c187a29f8994632dac71ebf7b.zip
FreeBSD-src-17cc23f57886f93c187a29f8994632dac71ebf7b.tar.gz
Be more efficient in how we use memory (stumbled across while looking for
something else) for attributes and variables. Remove stack-stomper in sstrncpy().
Diffstat (limited to 'usr.sbin/sade/misc.c')
-rw-r--r--usr.sbin/sade/misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/sade/misc.c b/usr.sbin/sade/misc.c
index 17ce8eb..af88fe3 100644
--- a/usr.sbin/sade/misc.c
+++ b/usr.sbin/sade/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);
}
OpenPOWER on IntegriCloud