diff options
author | 2004-12-22 17:18:51 +0000 | |
---|---|---|
committer | 2004-12-22 17:18:51 +0000 | |
commit | 83cddccde1b75bbee122e36a65661a17dfc6d68f (patch) | |
tree | 2f4c2673e9c30c3d9e56d68357f0f74fae44bfa9 /bin/ksh/misc.c | |
parent | Introduce 'set skip on <ifspec>' to support a list of interfaces where no (diff) | |
download | wireguard-openbsd-83cddccde1b75bbee122e36a65661a17dfc6d68f.tar.xz wireguard-openbsd-83cddccde1b75bbee122e36a65661a17dfc6d68f.zip |
g/c str_zcpy()
Diffstat (limited to 'bin/ksh/misc.c')
-rw-r--r-- | bin/ksh/misc.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/bin/ksh/misc.c b/bin/ksh/misc.c index 03c03b053f1..059c368360c 100644 --- a/bin/ksh/misc.c +++ b/bin/ksh/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.25 2004/12/22 17:14:34 millert Exp $ */ +/* $OpenBSD: misc.c,v 1.26 2004/12/22 17:18:51 millert Exp $ */ /* * Miscellaneous functions @@ -1116,23 +1116,6 @@ strip_nuls(char *buf, int nbytes) return nbytes; } -/* Copy at most dsize-1 bytes from src to dst, ensuring dst is null terminated. - * Returns dst. - */ -char * -str_zcpy(char *dst, const char *src, int dsize) -{ - if (dsize > 0) { - int len = strlen(src); - - if (len >= dsize) - len = dsize - 1; - memcpy(dst, src, len); - dst[len] = '\0'; - } - return dst; -} - /* Like read(2), but if read fails due to non-blocking flag, resets flag * and restarts read. */ |