Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
In generate_files(), changed arg "f" to "f_out", as Chris Shoemaker
[rsync/rsync.git]
/
lib
/
compat.c
diff --git
a/lib/compat.c
b/lib/compat.c
index
6dd2328
..
879f548
100644
(file)
--- a/
lib/compat.c
+++ b/
lib/compat.c
@@
-116,10
+116,12
@@
{
size_t len = strlen(s);
size_t ret = len;
{
size_t len = strlen(s);
size_t ret = len;
- if (bufsize <= 0) return 0;
- if (len >= bufsize) len = bufsize-1;
- memcpy(d, s, len);
- d[len] = 0;
+ if (bufsize > 0) {
+ if (len >= bufsize)
+ len = bufsize-1;
+ memcpy(d, s, len);
+ d[len] = 0;
+ }
return ret;
}
#endif
return ret;
}
#endif