projects
/
pgbouncer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a092a07
)
remote bloat from strlcat
author
Marko Kreen
<markokr@gmail.com>
Fri, 13 Apr 2007 11:32:43 +0000
(11:32 +0000)
committer
Marko Kreen
<markokr@gmail.com>
Fri, 13 Apr 2007 11:32:43 +0000
(11:32 +0000)
src/util.c
patch
|
blob
|
blame
|
history
diff --git
a/src/util.c
b/src/util.c
index 6f83421baa9df63c474d58d67aa073ea19427c56..9b9225df6e42be12d612f7318e404e1aa92536b4 100644
(file)
--- a/
src/util.c
+++ b/
src/util.c
@@
-40,7
+40,7
@@
void *zmalloc(size_t len)
}
/*
- *
Safe string copy
+ *
Minimal spec-conforming implementations of strlcpy(), strlcat().
*/
#ifndef HAVE_STRLCPY
size_t strlcpy(char *dst, const char *src, size_t n)
@@
-61,9
+61,7
@@
size_t strlcat(char *dst, const char *src, size_t n)
size_t pos = 0;
while (pos < n && dst[pos])
pos++;
- if (pos < n)
- return pos + strlcpy(dst + pos, src, n - pos);
- return pos + strlen(src);
+ return pos + strlcpy(dst + pos, src, n - pos);
}
#endif