parent
9d569438d3
commit
2b6fa0839f
|
@ -67,7 +67,7 @@ writepidfile(const char * fname, int pid)
|
|||
int pidstringlen;
|
||||
int pidfile;
|
||||
|
||||
if(!fname || (strlen(fname) == 0))
|
||||
if(!fname || fname[0] == '\0')
|
||||
return -1;
|
||||
|
||||
if( (pidfile = open(fname, O_WRONLY|O_CREAT, 0644)) < 0)
|
||||
|
@ -102,7 +102,7 @@ checkforrunning(const char * fname)
|
|||
int pidfile;
|
||||
pid_t pid;
|
||||
|
||||
if(!fname || (strlen(fname) == 0))
|
||||
if(!fname || fname[0] == '\0')
|
||||
return -1;
|
||||
|
||||
if( (pidfile = open(fname, O_RDONLY)) < 0)
|
||||
|
|
|
@ -412,7 +412,7 @@ static void upnpc_desc_received(struct evhttp_request * req, void * pvoid)
|
|||
d->control_cif_url, d->cif_service_type);
|
||||
|
||||
if((d->cif_service_type == NULL)
|
||||
|| (strlen(d->cif_service_type) == 0)
|
||||
|| (d->cif_service_type[0] == '\0')
|
||||
|| (!COMPARE(d->cif_service_type, "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:"))) {
|
||||
d->parent->ready_cb(UPNPC_ERR_NOT_IGD, d->parent, d, d->parent->cb_data);
|
||||
} else {
|
||||
|
|
|
@ -67,7 +67,7 @@ writepidfile(const char * fname, int pid)
|
|||
int pidstringlen;
|
||||
int pidfile;
|
||||
|
||||
if(!fname || (strlen(fname) == 0))
|
||||
if(!fname || fname[0] == '\0')
|
||||
return -1;
|
||||
|
||||
if( (pidfile = open(fname, O_WRONLY|O_CREAT, 0644)) < 0)
|
||||
|
@ -102,7 +102,7 @@ checkforrunning(const char * fname)
|
|||
int pidfile;
|
||||
pid_t pid;
|
||||
|
||||
if(!fname || (strlen(fname) == 0))
|
||||
if(!fname || fname[0] == '\0')
|
||||
return -1;
|
||||
|
||||
if( (pidfile = open(fname, O_RDONLY)) < 0)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/* MiniUPnP project
|
||||
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||
* author: Ryan Wagoner
|
||||
* (c) 2006-2014 Thomas Bernard
|
||||
* (c) 2006-2018 Thomas Bernard
|
||||
* This software is subject to the conditions detailed
|
||||
* in the LICENCE file provided within the distribution */
|
||||
|
||||
|
@ -106,7 +106,7 @@ readoptionsfile(const char * fname)
|
|||
size_t len;
|
||||
void *tmp;
|
||||
|
||||
if(!fname || (strlen(fname) == 0))
|
||||
if(!fname || (fname[0] == '\0'))
|
||||
return -1;
|
||||
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
|
|
Loading…
Reference in New Issue