diff options
author | Nicholas <nbnoll@eml.cc> | 2021-11-10 20:12:45 -0800 |
---|---|---|
committer | Nicholas <nbnoll@eml.cc> | 2021-11-11 08:16:47 -0800 |
commit | 7ea1cdb7d31f00024f5a1d124b42cd19a03b959a (patch) | |
tree | f65abf9fa32856287de586129d4ed7c1c473864a /sys/cmd/ic/strlcpy.c | |
parent | 43688fe7190d0350349d47727c3663421d5618dc (diff) |
chore: libunicode -> libutf
Diffstat (limited to 'sys/cmd/ic/strlcpy.c')
-rw-r--r-- | sys/cmd/ic/strlcpy.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/cmd/ic/strlcpy.c b/sys/cmd/ic/strlcpy.c index db0e6f0..5af7906 100644 --- a/sys/cmd/ic/strlcpy.c +++ b/sys/cmd/ic/strlcpy.c @@ -15,18 +15,18 @@ strlcpy(char *dst, const char *src, size_t siz) size_t n = siz; /* Copy as many bytes as will fit */ - if (n != 0) { - while (--n != 0) { - if ((*d++ = *s++) == '\0') + if(n != 0) { + while(--n != 0) { + if((*d++ = *s++) == '\0') break; } } /* Not enough room in dst, add NUL and traverse rest of src */ - if (n == 0) { - if (siz != 0) + if(n == 0) { + if(siz != 0) *d = '\0'; /* NUL-terminate dst */ - while (*s++) + while(*s++) ; } - return(s - src - 1); /* count does not include NUL */ + return s - src - 1; /* count does not include NUL */ } |