strlen cannot return less than zero

This commit is contained in:
Mark 2005-10-19 22:16:31 +00:00
parent 10de99000e
commit 52b35bd232
2 changed files with 3 additions and 3 deletions

4
opsb.c
View file

@ -474,7 +474,6 @@ void checkqueue()
list_delete(opsbq, scannode);
lnode_destroy(scannode);
startscan(scandata);
}
/** @brief addtocache
@ -783,7 +782,8 @@ int ModInit( void )
int ModSynch (void)
{
SET_SEGV_LOCATION();
if (strlen(opsb.targetip) <= 0) {
if (strlen(opsb.targetip) == 0)
{
strlcpy(opsb.targetip, inet_ntoa(me.srvip.sin_addr), MAXHOST);
}
if (init_scanengine() != NS_SUCCESS) {

2
opsb.h
View file

@ -61,7 +61,7 @@ struct opsb {
int targetport;
int maxbytes;
int timeout;
int socks;
unsigned int socks;
int open;
int scanned;
char scanmsg[BUFSIZE];