aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/ic/strlcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cmd/ic/strlcpy.c')
-rw-r--r--sys/cmd/ic/strlcpy.c14
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 */
}