chiark / gitweb /
[PATCH] klibc: version 1.0.5
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Tue, 29 Mar 2005 01:53:45 +0000 (03:53 +0200)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 06:55:00 +0000 (23:55 -0700)
klibc/klibc/strlcat.c
klibc/klibc/strlcpy.c
klibc/version
udev_libc_wrapper.c

index fdd72ac392c5b910f19c5e66ecc6227f1577e41a..f397857e76362f3badc9763f14aa06ba3779a677 100644 (file)
@@ -26,8 +26,7 @@ size_t strlcat(char *dst, const char *src, size_t size)
     bytes++;
   }
 
-  if (size)
-    *q = '\0';
+  *q = '\0';
   return bytes;
 }
 
index 9e7b6bf91fa692779bcc7b7517bc4471c6695e49..e6937445cd64e5a0a8da91e8cbfeb3924604ad8a 100644 (file)
@@ -19,8 +19,10 @@ size_t strlcpy(char *dst, const char *src, size_t size)
     bytes++;
   }
 
-  if (size)
+  /* If size == 0 there is no space for a final null... */
+  if ( size )
     *q = '\0';
+
   return bytes;
 }
 
index ee90284c27f187a315f1267b063fa81b5b84f613..90a27f9cea6e8f02e05a8bbab5d14650e3e932af 100644 (file)
@@ -1 +1 @@
-1.0.4
+1.0.5
index d69f2ac48e11dfb0dcc01daa6125089697307b93..1852141c9378c7baa9b389013ed838a90a2d9871 100644 (file)
@@ -58,8 +58,10 @@ size_t strlcpy(char *dst, const char *src, size_t size)
                bytes++;
        }
 
+       /* If size == 0 there is no space for a final null... */
        if (size)
                *q = '\0';
+
        return bytes;
 }
 
@@ -83,8 +85,7 @@ size_t strlcat(char *dst, const char *src, size_t size)
                bytes++;
        }
 
-       if (size)
-               *q = '\0';
+       *q = '\0';
        return bytes;
 }
 #endif /* __OWN_STRLCPYCAT__ */