gcc warning fixes.

This patch fixes gcc warning:
    warning: suggest braces around empty body in an ‘if’ statement
This was the case in  when the macro SCLogDebug was used:
    if (ssn != NULL)
        SCLogDebug("ssn->alproto %"PRIu16"", ssn->alproto);

It also fixes a signed-unsigned comparison.
remotes/origin/master-1.0.x
Eric Leblond 17 years ago committed by Victor Julien
parent bda8702474
commit 84dfc0172a

@ -149,11 +149,6 @@ DetectWindowData *DetectWindowParse(char *windowstr) {
if (-1 == ByteExtractStringUint16(&wd->size, 10, 0, str_ptr)) { if (-1 == ByteExtractStringUint16(&wd->size, 10, 0, str_ptr)) {
goto error; goto error;
} }
/* If greater than 1GB window */
if (wd->size < MIN_WINDOW_VALUE || wd->size > MAX_WINDOW_VALUE) {
goto error;
}
} }
} }

@ -285,7 +285,7 @@ extern int sc_log_module_cleaned;
/* Avoid the overhead of using the debugging subsystem, in production mode */ /* Avoid the overhead of using the debugging subsystem, in production mode */
#ifndef DEBUG #ifndef DEBUG
#define SCLogDebug(...) #define SCLogDebug(...) do { } while (0)
#define SCEnter(...) #define SCEnter(...)

Loading…
Cancel
Save