commit 2dbb69493249468aa9c9359cc5eb66c49239fd3c
Author: Hiltjo Posthuma <[email protected]>
Date:   Sun Jun 1 13:35:58 2014 +0200

    strlcat, strlcpy style
    
    Signed-off-by: Hiltjo Posthuma <[email protected]>

diff --git a/util/strlcat.c b/util/strlcat.c
index 5631195..c64b1c7 100644
--- a/util/strlcat.c
+++ b/util/strlcat.c
@@ -20,32 +20,32 @@
 
 /*
  * Appends src to string dst of size siz (unlike strncat, siz is the
- * full size of dst, not space left).  At most siz-1 characters
- * will be copied.  Always NUL terminates (unless siz <= strlen(dst)).
+ * full size of dst, not space left). At most siz-1 characters
+ * will be copied. Always NUL terminates (unless siz <= strlen(dst)).
  * Returns strlen(src) + MIN(siz, strlen(initial dst)).
  * If retval >= siz, truncation occurred.
  */
 size_t
 strlcat(char *dst, const char *src, size_t siz)
 {
-        char *d = dst;
-        const char *s = src;
-        size_t n = siz;
-        size_t dlen;
-        /* Find the end of dst and adjust bytes left but don't go past end */
-        while (n-- != 0 && *d != '

Reply via email to