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
Set stats.current_file_index.
[rsync/rsync.git]
/
loadparm.c
diff --git
a/loadparm.c
b/loadparm.c
index
3dcfc4f
..
d9ce157
100644
(file)
--- a/
loadparm.c
+++ b/
loadparm.c
@@
-441,10
+441,10
@@
static int add_a_service(service *pservice, char *name)
i = iNumServices;
i = iNumServices;
- ServicePtrs =
(service **)Realloc(ServicePtrs,sizeof(service *)*
num_to_alloc);
+ ServicePtrs =
realloc_array(ServicePtrs, service *,
num_to_alloc);
if (ServicePtrs)
if (ServicePtrs)
- pSERVICE(iNumServices) =
(service *)malloc(sizeof(service)
);
+ pSERVICE(iNumServices) =
new(service
);
if (!ServicePtrs || !pSERVICE(iNumServices))
return(-1);
if (!ServicePtrs || !pSERVICE(iNumServices))
return(-1);
@@
-665,8
+665,8
@@
static BOOL lp_do_parameter(int snum, char *parmname, char *parmvalue)
string_set(parm_ptr,parmvalue);
if ((cp = *(char**)parm_ptr) != NULL) {
int len = strlen(cp);
string_set(parm_ptr,parmvalue);
if ((cp = *(char**)parm_ptr) != NULL) {
int len = strlen(cp);
- while (len
&& cp[--len] == '/')
-
cp[len] = '\0';
+ while (len
> 1 && cp[len-1] == '/') len--;
+ cp[len] = '\0';
}
break;
}
break;