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
changed a couple of places to use strlcpy()
[rsync/rsync.git]
/
loadparm.c
diff --git
a/loadparm.c
b/loadparm.c
index
d22bef8
..
7fff24f
100644
(file)
--- a/
loadparm.c
+++ b/
loadparm.c
@@
-52,7
+52,7
@@
#define strequal(a,b) (strcasecmp(a,b)==0)
#define BOOLSTR(b) ((b) ? "Yes" : "No")
typedef char pstring[1024];
#define strequal(a,b) (strcasecmp(a,b)==0)
#define BOOLSTR(b) ((b) ? "Yes" : "No")
typedef char pstring[1024];
-#define pstrcpy(a,b) str
cpy(a,b
)
+#define pstrcpy(a,b) str
lcpy(a,b,sizeof(pstring)-1
)
/* the following are used by loadparm for option lists */
typedef enum
/* the following are used by loadparm for option lists */
typedef enum
@@
-221,13
+221,12
@@
initialise a service to the defaults
***************************************************************************/
static void init_service(service *pservice)
{
***************************************************************************/
static void init_service(service *pservice)
{
- bzero((char *)pservice,sizeof(service));
- copy_service(pservice,&sDefault);
+
bzero((char *)pservice,sizeof(service));
+
copy_service(pservice,&sDefault);
}
static void string_set(char **s, char *v)
{
}
static void string_set(char **s, char *v)
{
- if (*s) free(*s);
if (!v) {
*s = NULL;
return;
if (!v) {
*s = NULL;
return;