]> git.sur5r.net Git - bacula/bacula/commitdiff
Merge branch 'master' of ssh://bacula.git.sourceforge.net/gitroot/bacula/bacula
authorKern Sibbald <kern@sibbald.com>
Tue, 8 Dec 2009 08:36:47 +0000 (09:36 +0100)
committerKern Sibbald <kern@sibbald.com>
Tue, 8 Dec 2009 08:36:47 +0000 (09:36 +0100)
bacula/src/lib/bsys.c

index 7527ec412257e57a3545180c26354faeeaede86c..730999310f486cc2c645c6d0644db0881fac4050 100644 (file)
@@ -105,7 +105,6 @@ char *bstrncpy(char *dest, POOL_MEM &src, int maxlen)
    return dest;
 }
 
-
 char *bstrncat(char *dest, const char *src, int maxlen)
 {
    int len = strlen(dest);
@@ -116,9 +115,13 @@ char *bstrncat(char *dest, const char *src, int maxlen)
    return dest;
 }
 
+/*
+ * Note: Here the maxlen is the maximum length permitted
+ *  stored in dest, while on Unix systems, it is the maximum characters
+ *  that may be copied from src.
+ */
 char *bstrncat(char *dest, POOL_MEM &src, int maxlen)
 {
-
    int len = strlen(dest);
    if (len < maxlen-1) {
       strncpy(dest+len, src.c_str(), maxlen-len-1);