mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 11:16:33 +03:00
Removed useless code
This commit is contained in:
@@ -2473,28 +2473,16 @@ not_enough_memory:
|
||||
|
||||
int read_line(char *buf, int len, FILE *fp)
|
||||
{
|
||||
char *tmp;
|
||||
if (buf == NULL) return -1;
|
||||
|
||||
if (buf == NULL)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
memset(buf, '\0', len*sizeof(char));
|
||||
|
||||
if (fgets(buf, len, fp) == NULL)
|
||||
{
|
||||
if (fgets(buf, len, fp) == NULL) {
|
||||
*buf = '\0';
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((tmp = strrchr(buf, '\n')) != NULL)
|
||||
{
|
||||
*tmp = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
char* tmp;
|
||||
if ((tmp = strrchr(buf, '\n')) != NULL) *tmp = '\0';
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user