From: Victor Julien Date: Thu, 15 Nov 2012 15:02:44 +0000 (+0100) Subject: Silence compiler warnings found by clang X-Git-Tag: suricata-1.4rc1~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84bad6db77a4c2c597d51cb626e95bdecfb5fcd7;p=thirdparty%2Fsuricata.git Silence compiler warnings found by clang --- diff --git a/src/detect-bytejump.c b/src/detect-bytejump.c index 90325d6b72..68ed674bd4 100644 --- a/src/detect-bytejump.c +++ b/src/detect-bytejump.c @@ -370,15 +370,15 @@ DetectBytejumpData *DetectBytejumpParse(char *optstr, char **offset) * and *yes* this *is* ugly. */ end_ptr = str_ptr; - while (!(isspace(*end_ptr) || (*end_ptr == ','))) end_ptr++; + while (!(isspace((unsigned char)*end_ptr) || (*end_ptr == ','))) end_ptr++; *(end_ptr++) = '\0'; args[0] = str_ptr; numargs++; str_ptr = end_ptr; - while (isspace(*str_ptr) || (*str_ptr == ',')) str_ptr++; + while (isspace((unsigned char)*str_ptr) || (*str_ptr == ',')) str_ptr++; end_ptr = str_ptr; - while (!(isspace(*end_ptr) || (*end_ptr == ',')) && (*end_ptr != '\0')) + while (!(isspace((unsigned char)*end_ptr) || (*end_ptr == ',')) && (*end_ptr != '\0')) end_ptr++; *(end_ptr++) = '\0'; args[1] = str_ptr; @@ -416,7 +416,7 @@ DetectBytejumpData *DetectBytejumpParse(char *optstr, char **offset) } /* Offset */ - if (args[1][0] != '-' && isalpha(args[1][0])) { + if (args[1][0] != '-' && isalpha((unsigned char)args[1][0])) { if (offset == NULL) { SCLogError(SC_ERR_INVALID_ARGUMENT, "byte_jump supplied with " "var name for offset. \"value\" argument supplied to " diff --git a/src/detect-bytetest.c b/src/detect-bytetest.c index e1c86ba157..50ad805024 100644 --- a/src/detect-bytetest.c +++ b/src/detect-bytetest.c @@ -339,7 +339,7 @@ DetectBytetestData *DetectBytetestParse(char *optstr, char **value, char **offse } /* Value */ - if (args[3][0] != '-' && isalpha(args[3][0])) { + if (args[3][0] != '-' && isalpha((unsigned char)args[3][0])) { if (value == NULL) { SCLogError(SC_ERR_INVALID_ARGUMENT, "byte_test supplied with " "var name for value. \"value\" argument supplied to " @@ -357,7 +357,7 @@ DetectBytetestData *DetectBytetestParse(char *optstr, char **value, char **offse } /* Offset */ - if (args[4][0] != '-' && isalpha(args[4][0])) { + if (args[4][0] != '-' && isalpha((unsigned char)args[4][0])) { if (offset == NULL) { SCLogError(SC_ERR_INVALID_ARGUMENT, "byte_test supplied with " "var name for offset. \"offset\" argument supplied to " diff --git a/src/detect-content.c b/src/detect-content.c index f09c77686c..606dbcec7a 100644 --- a/src/detect-content.c +++ b/src/detect-content.c @@ -77,7 +77,7 @@ int DetectContentDataParse(char *keyword, char *contentstr, char** pstr, uint16_ } /* skip the first spaces */ - while (pos < slen && isspace(contentstr[pos])) + while (pos < slen && isspace((unsigned char)contentstr[pos])) pos++; if (contentstr[pos] == '!') { @@ -135,7 +135,7 @@ int DetectContentDataParse(char *keyword, char *contentstr, char** pstr, uint16_ escape = 1; } else { if (bin) { - if (isdigit(str[i]) || + if (isdigit((unsigned char)str[i]) || str[i] == 'A' || str[i] == 'a' || str[i] == 'B' || str[i] == 'b' || str[i] == 'C' || str[i] == 'c' || diff --git a/src/detect-depth.c b/src/detect-depth.c index c167a301ca..f6ecc46bc2 100644 --- a/src/detect-depth.c +++ b/src/detect-depth.c @@ -148,7 +148,7 @@ static int DetectDepthSetup (DetectEngineCtx *de_ctx, Signature *s, char *depths goto error; } - if (str[0] != '-' && isalpha(str[0])) { + if (str[0] != '-' && isalpha((unsigned char)str[0])) { SigMatch *bed_sm = DetectByteExtractRetrieveSMVar(str, s, SigMatchListSMBelongsTo(s, pm)); diff --git a/src/detect-distance.c b/src/detect-distance.c index 10afa11b4c..8c442ceaa4 100644 --- a/src/detect-distance.c +++ b/src/detect-distance.c @@ -222,7 +222,7 @@ static int DetectDistanceSetup (DetectEngineCtx *de_ctx, Signature *s, goto error; } - if (str[0] != '-' && isalpha(str[0])) { + if (str[0] != '-' && isalpha((unsigned char)str[0])) { SigMatch *bed_sm = DetectByteExtractRetrieveSMVar(str, s, SigMatchListSMBelongsTo(s, pm)); diff --git a/src/detect-engine-address.c b/src/detect-engine-address.c index 75ed73fce7..fff5c76207 100644 --- a/src/detect-engine-address.c +++ b/src/detect-engine-address.c @@ -644,7 +644,7 @@ int DetectAddressParseString(DetectAddress *dd, char *str) /* 1.2.3.4/24 format */ for (u = 0; u < strlen(mask); u++) { - if(!isdigit(mask[u])) + if(!isdigit((unsigned char)mask[u])) goto error; } diff --git a/src/detect-engine-iponly.c b/src/detect-engine-iponly.c index 563f191903..903edc504a 100644 --- a/src/detect-engine-iponly.c +++ b/src/detect-engine-iponly.c @@ -160,7 +160,7 @@ static int IPOnlyCIDRItemParseSingle(IPOnlyCIDRItem *dd, char *str) /* 1.2.3.4/24 format */ for (u = 0; u < strlen(mask); u++) { - if(!isdigit(mask[u])) + if(!isdigit((unsigned char)mask[u])) goto error; } diff --git a/src/detect-engine.c b/src/detect-engine.c index b3310a39a4..ec80abc9e0 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -549,6 +549,7 @@ static void *DetectEngineLiveRuleSwap(void *arg) SCLogInfo("===== Live rule swap DONE ====="); pthread_exit(NULL); + return NULL; } void DetectEngineSpawnLiveRuleSwapMgmtThread(void) diff --git a/src/detect-flowvar.c b/src/detect-flowvar.c index 744376817e..c01ef37019 100644 --- a/src/detect-flowvar.c +++ b/src/detect-flowvar.c @@ -172,7 +172,7 @@ static int DetectFlowvarSetup (DetectEngineCtx *de_ctx, Signature *s, char *raws } } else { if (bin) { - if (isdigit(str[i]) || + if (isdigit((unsigned char)str[i]) || str[i] == 'A' || str[i] == 'a' || str[i] == 'B' || str[i] == 'b' || str[i] == 'C' || str[i] == 'c' || diff --git a/src/detect-ftpbounce.c b/src/detect-ftpbounce.c index 80379bc317..ee43e2252a 100644 --- a/src/detect-ftpbounce.c +++ b/src/detect-ftpbounce.c @@ -113,10 +113,10 @@ int DetectFtpbounceMatchArgs(uint8_t *payload, uint16_t payload_len, i = offset; /* Search for the first IP octect(Skips "PORT ") */ - while (i < payload_len && !isdigit(c[i])) i++; + while (i < payload_len && !isdigit((unsigned char)c[i])) i++; for (;i < payload_len && octet_ascii_len < 4 ;i++) { - if (isdigit(c[i])) { + if (isdigit((unsigned char)c[i])) { octet =(c[i] - '0') + octet * 10; octet_ascii_len++; } else { @@ -125,8 +125,8 @@ int DetectFtpbounceMatchArgs(uint8_t *payload, uint16_t payload_len, return 0; } - if (isspace(c[i])) - while (i < payload_len && isspace(c[i]) ) i++; + if (isspace((unsigned char)c[i])) + while (i < payload_len && isspace((unsigned char)c[i]) ) i++; if (i < payload_len && c[i] == ',') { /* we have an octet */ noctet++; diff --git a/src/detect-ipproto.c b/src/detect-ipproto.c index 11e5f5a3e9..237b2a6aa6 100644 --- a/src/detect-ipproto.c +++ b/src/detect-ipproto.c @@ -140,7 +140,7 @@ static DetectIPProtoData *DetectIPProtoParse(const char *optstr) } /* Protocol name/number */ - if (!isdigit(*(args[1]))) { + if (!isdigit((unsigned char)*(args[1]))) { struct protoent *pent = getprotobyname(args[1]); if (pent == NULL) { SCLogError(SC_ERR_INVALID_VALUE, "Malformed protocol name: %s", diff --git a/src/detect-isdataat.c b/src/detect-isdataat.c index 2a4f59aee0..ef26557888 100644 --- a/src/detect-isdataat.c +++ b/src/detect-isdataat.c @@ -182,7 +182,7 @@ DetectIsdataatData *DetectIsdataatParse (char *isdataatstr, char **offset) idad->flags = 0; idad->dataat = 0; - if (args[0][0] != '-' && isalpha(args[0][0])) { + if (args[0][0] != '-' && isalpha((unsigned char)args[0][0])) { if (offset == NULL) { SCLogError(SC_ERR_INVALID_ARGUMENT, "isdataat supplied with " "var name for offset. \"offset\" argument supplied to " diff --git a/src/detect-offset.c b/src/detect-offset.c index e5412d7a35..21beeb94da 100644 --- a/src/detect-offset.c +++ b/src/detect-offset.c @@ -147,7 +147,7 @@ int DetectOffsetSetup (DetectEngineCtx *de_ctx, Signature *s, char *offsetstr) goto error; } - if (str[0] != '-' && isalpha(str[0])) { + if (str[0] != '-' && isalpha((unsigned char)str[0])) { SigMatch *bed_sm = DetectByteExtractRetrieveSMVar(str, s, SigMatchListSMBelongsTo(s, pm)); diff --git a/src/detect-parse.c b/src/detect-parse.c index a52176e2db..cde2ed7530 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -1661,7 +1661,7 @@ int DetectParseContentString (char *contentstr, uint8_t **result, uint16_t *resu /* skip the first spaces */ slen = strlen(temp); - while (pos < slen && isspace(temp[pos])) { + while (pos < slen && isspace((unsigned char)temp[pos])) { pos++; } @@ -1728,7 +1728,7 @@ int DetectParseContentString (char *contentstr, uint8_t **result, uint16_t *resu escape = 1; } else { if (bin) { - if (isdigit(str[i]) || + if (isdigit((unsigned char)str[i]) || str[i] == 'A' || str[i] == 'a' || str[i] == 'B' || str[i] == 'b' || str[i] == 'C' || str[i] == 'c' || diff --git a/src/detect-pcre.c b/src/detect-pcre.c index 3e10f1b258..adbad05631 100644 --- a/src/detect-pcre.c +++ b/src/detect-pcre.c @@ -269,7 +269,7 @@ DetectPcreData *DetectPcreParse (DetectEngineCtx *de_ctx, char *regexstr) uint16_t pos = 0; uint8_t negate = 0; - while (pos < slen && isspace(regexstr[pos])) { + while (pos < slen && isspace((unsigned char)regexstr[pos])) { pos++; } diff --git a/src/detect-pktvar.c b/src/detect-pktvar.c index fb14f68bdf..603b3b018d 100644 --- a/src/detect-pktvar.c +++ b/src/detect-pktvar.c @@ -168,7 +168,7 @@ static int DetectPktvarSetup (DetectEngineCtx *de_ctx, Signature *s, char *rawst } } else { if (bin) { - if (isdigit(str[i]) || + if (isdigit((unsigned char)str[i]) || str[i] == 'A' || str[i] == 'a' || str[i] == 'B' || str[i] == 'b' || str[i] == 'C' || str[i] == 'c' || diff --git a/src/detect-tos.c b/src/detect-tos.c index 90d9e81433..942dd28b5e 100644 --- a/src/detect-tos.c +++ b/src/detect-tos.c @@ -153,7 +153,7 @@ DetectTosData *DetectTosParse(char *arg) negated = 1; } - while (isspace(*str_ptr)) + while (isspace((unsigned char)*str_ptr)) str_ptr++; if (*str_ptr == 'x' || *str_ptr == 'X') { diff --git a/src/detect-within.c b/src/detect-within.c index a267c3c85a..b64ac9dbfb 100644 --- a/src/detect-within.c +++ b/src/detect-within.c @@ -220,7 +220,7 @@ static int DetectWithinSetup (DetectEngineCtx *de_ctx, Signature *s, char *withi goto error; } - if (str[0] != '-' && isalpha(str[0])) { + if (str[0] != '-' && isalpha((unsigned char)str[0])) { SigMatch *bed_sm = DetectByteExtractRetrieveSMVar(str, s, SigMatchListSMBelongsTo(s, pm)); diff --git a/src/detect.c b/src/detect.c index 9d70d29e5b..1833e7432e 100644 --- a/src/detect.c +++ b/src/detect.c @@ -303,7 +303,7 @@ int DetectLoadSigFile(DetectEngineCtx *de_ctx, char *sig_file, int *sigs_tot) { continue; /* Check for multiline rules. */ - while (len > 0 && isspace(line[--len])); + while (len > 0 && isspace((unsigned char)line[--len])); if (line[len] == '\\') { multiline++; offset = len; diff --git a/src/flow-manager.c b/src/flow-manager.c index 7cd7e7700e..f0aa7186eb 100644 --- a/src/flow-manager.c +++ b/src/flow-manager.c @@ -555,6 +555,7 @@ void *FlowManagerThread(void *td) TmThreadsSetFlag(th_v, THV_CLOSED); pthread_exit((void *) 0); + return NULL; } /** \brief spawn the flow manager thread */ diff --git a/src/suricata.c b/src/suricata.c index ac89f13a06..3e714a42dd 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -1057,7 +1057,7 @@ int main(int argc, char **argv) if (strcmp(pcap_dev, optarg) != 0) { SCLogInfo("translated %s to pcap device %s", optarg, pcap_dev); - } else if (strlen(pcap_dev) > 0 && isdigit(pcap_dev[0])) { + } else if (strlen(pcap_dev) > 0 && isdigit((unsigned char)pcap_dev[0])) { SCLogError(SC_ERR_PCAP_TRANSLATE, "failed to find a pcap device for IP %s", optarg); exit(EXIT_FAILURE); } diff --git a/src/tm-threads.c b/src/tm-threads.c index 883e9c3f1a..8b4fbb142a 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -158,6 +158,7 @@ void *TmThreadsSlot1NoIn(void *td) TmThreadsSetFlag(tv, THV_CLOSED | THV_RUNNING_DONE); pthread_exit((void *) -1); + return NULL; } (void)SC_ATOMIC_SET(s->slot_data, slot_data); } @@ -220,11 +221,13 @@ void *TmThreadsSlot1NoIn(void *td) if (r != TM_ECODE_OK) { TmThreadsSetFlag(tv, THV_CLOSED); pthread_exit((void *) -1); + return NULL; } } TmThreadsSetFlag(tv, THV_CLOSED); pthread_exit((void *) 0); + return NULL; } void *TmThreadsSlot1NoOut(void *td) @@ -257,6 +260,7 @@ void *TmThreadsSlot1NoOut(void *td) TmThreadsSetFlag(tv, THV_CLOSED | THV_RUNNING_DONE); pthread_exit((void *) -1); + return NULL; } (void)SC_ATOMIC_SET(s->slot_data, slot_data); } @@ -301,11 +305,13 @@ void *TmThreadsSlot1NoOut(void *td) if (r != TM_ECODE_OK) { TmThreadsSetFlag(tv, THV_CLOSED); pthread_exit((void *) -1); + return NULL; } } TmThreadsSetFlag(tv, THV_CLOSED); pthread_exit((void *) 0); + return NULL; } void *TmThreadsSlot1NoInOut(void *td) @@ -339,6 +345,7 @@ void *TmThreadsSlot1NoInOut(void *td) TmThreadsSetFlag(tv, THV_CLOSED | THV_RUNNING_DONE); pthread_exit((void *) -1); + return NULL; } (void)SC_ATOMIC_SET(s->slot_data, slot_data); } @@ -377,11 +384,13 @@ void *TmThreadsSlot1NoInOut(void *td) if (r != TM_ECODE_OK) { TmThreadsSetFlag(tv, THV_CLOSED); pthread_exit((void *) -1); + return NULL; } } TmThreadsSetFlag(tv, THV_CLOSED); pthread_exit((void *) 0); + return NULL; } void *TmThreadsSlot1(void *td) @@ -416,6 +425,7 @@ void *TmThreadsSlot1(void *td) TmThreadsSetFlag(tv, THV_CLOSED | THV_RUNNING_DONE); pthread_exit((void *) -1); + return NULL; } (void)SC_ATOMIC_SET(s->slot_data, slot_data); } @@ -492,12 +502,14 @@ void *TmThreadsSlot1(void *td) if (r != TM_ECODE_OK) { TmThreadsSetFlag(tv, THV_CLOSED); pthread_exit((void *) -1); + return NULL; } } SCLogDebug("%s ending", tv->name); TmThreadsSetFlag(tv, THV_CLOSED); pthread_exit((void *) 0); + return NULL; } /** @@ -623,6 +635,7 @@ void *TmThreadsSlotPktAcqLoop(void *td) { TmThreadsSetFlag(tv, THV_CLOSED | THV_RUNNING_DONE); pthread_exit((void *) -1); + return NULL; } for (slot = s; slot != NULL; slot = slot->slot_next) { @@ -634,6 +647,7 @@ void *TmThreadsSlotPktAcqLoop(void *td) { TmThreadsSetFlag(tv, THV_CLOSED | THV_RUNNING_DONE); pthread_exit((void *) -1); + return NULL; } (void)SC_ATOMIC_SET(slot->slot_data, slot_data); } @@ -670,6 +684,7 @@ void *TmThreadsSlotPktAcqLoop(void *td) { if (r != TM_ECODE_OK) { TmThreadsSetFlag(tv, THV_CLOSED); pthread_exit((void *) -1); + return NULL; } } } @@ -677,6 +692,7 @@ void *TmThreadsSlotPktAcqLoop(void *td) { SCLogDebug("%s ending", tv->name); TmThreadsSetFlag(tv, THV_CLOSED); pthread_exit((void *) 0); + return NULL; } @@ -712,6 +728,7 @@ void *TmThreadsSlotVar(void *td) TmThreadsSetFlag(tv, THV_CLOSED | THV_RUNNING_DONE); pthread_exit((void *) -1); + return NULL; } for (; s != NULL; s = s->slot_next) { @@ -723,6 +740,7 @@ void *TmThreadsSlotVar(void *td) TmThreadsSetFlag(tv, THV_CLOSED | THV_RUNNING_DONE); pthread_exit((void *) -1); + return NULL; } (void)SC_ATOMIC_SET(s->slot_data, slot_data); } @@ -807,6 +825,7 @@ void *TmThreadsSlotVar(void *td) if (r != TM_ECODE_OK) { TmThreadsSetFlag(tv, THV_CLOSED); pthread_exit((void *) -1); + return NULL; } } } @@ -814,6 +833,7 @@ void *TmThreadsSlotVar(void *td) SCLogDebug("%s ending", tv->name); TmThreadsSetFlag(tv, THV_CLOSED); pthread_exit((void *) 0); + return NULL; } /** diff --git a/src/util-classification-config.c b/src/util-classification-config.c index d270bafcbf..72cfadaaa0 100644 --- a/src/util-classification-config.c +++ b/src/util-classification-config.c @@ -211,7 +211,7 @@ static char *SCClassConfStringToLowercase(const char *str) temp_str = new_str; while (*temp_str != '\0') { - *temp_str = tolower(*temp_str); + *temp_str = tolower((unsigned char)*temp_str); temp_str++; } @@ -328,7 +328,7 @@ static int SCClassConfIsLineBlankOrComment(char *line) return 1; /* this line is neither a comment line, nor a blank line */ - if (!isspace(*line)) + if (!isspace((unsigned char)*line)) return 0; line++; @@ -446,7 +446,7 @@ uint32_t SCClassConfClasstypeHashFunc(HashTable *ht, void *data, uint16_t datale int len = strlen(ct->classtype); for (i = 0; i < len; i++) - hash += tolower((ct->classtype)[i]); + hash += tolower((unsigned char)(ct->classtype)[i]); hash = hash % ht->array_size; diff --git a/src/util-host-os-info.c b/src/util-host-os-info.c index fb34314048..e2d1698de2 100644 --- a/src/util-host-os-info.c +++ b/src/util-host-os-info.c @@ -58,7 +58,6 @@ SCEnumCharMap sc_hinfo_os_policy_map[ ] = { /** Radix tree that holds the host OS information */ static SCRadixTree *sc_hinfo_tree = NULL; -static SCRadixTree *sc_hinfo_tree_backup = NULL; /** * \brief Validates an IPV4 address and returns the network endian arranged @@ -431,6 +430,7 @@ void SCHInfoLoadFromConfig(void) /*------------------------------------Unit_Tests------------------------------*/ #ifdef UNITTESTS +static SCRadixTree *sc_hinfo_tree_backup = NULL; static void SCHInfoCreateContextBackup(void) { diff --git a/src/util-path.c b/src/util-path.c index 8be7d96bfb..09621320f7 100644 --- a/src/util-path.c +++ b/src/util-path.c @@ -42,7 +42,7 @@ int PathIsAbsolute(const char *path) { #if (defined OS_WIN32 || defined __CYGWIN__) if (strlen(path) > 2) { - if (isalpha(path[0]) && path[1] == ':') { + if (isalpha((unsigned char)path[0]) && path[1] == ':') { return 1; } } diff --git a/src/util-privs.c b/src/util-privs.c index af87e9ab69..0d221b3472 100644 --- a/src/util-privs.c +++ b/src/util-privs.c @@ -161,7 +161,7 @@ int SCGetUserID(char *user_name, char *group_name, uint32_t *uid, uint32_t *gid) struct passwd *pw; /* Get the user ID */ - if (isdigit(user_name[0]) != 0) { + if (isdigit((unsigned char)user_name[0]) != 0) { userid = atoi(user_name); pw = getpwuid(userid); if (pw == NULL) { @@ -183,7 +183,7 @@ int SCGetUserID(char *user_name, char *group_name, uint32_t *uid, uint32_t *gid) if (group_name != NULL) { struct group *gp; - if (isdigit(group_name[0]) != 0) { + if (isdigit((unsigned char)group_name[0]) != 0) { groupid = atoi(group_name); } else { gp = getgrnam(group_name); @@ -223,7 +223,7 @@ int SCGetGroupID(char *group_name, uint32_t *gid) struct group *gp; /* Get the group ID */ - if (isdigit(group_name[0]) != 0) { + if (isdigit((unsigned char)group_name[0]) != 0) { grpid = atoi(group_name); } else { gp = getgrnam(group_name); diff --git a/src/util-reference-config.c b/src/util-reference-config.c index 8212c3b522..1eb8047e05 100644 --- a/src/util-reference-config.c +++ b/src/util-reference-config.c @@ -206,7 +206,7 @@ static char *SCRConfStringToLowercase(const char *str) temp_str = new_str; while (*temp_str != '\0') { - *temp_str = tolower(*temp_str); + *temp_str = tolower((unsigned char)*temp_str); temp_str++; } @@ -305,7 +305,7 @@ static int SCRConfIsLineBlankOrComment(char *line) return 1; /* this line is neither a comment line, nor a blank line */ - if (!isspace(*line)) + if (!isspace((unsigned char)*line)) return 0; line++; @@ -418,7 +418,7 @@ uint32_t SCRConfReferenceHashFunc(HashTable *ht, void *data, uint16_t datalen) int len = strlen(ref->system); for (i = 0; i < len; i++) - hash += tolower(ref->system[i]); + hash += tolower((unsigned char)ref->system[i]); hash = hash % ht->array_size; diff --git a/src/util-threshold-config.c b/src/util-threshold-config.c index d7183ba0f8..3b659c37cc 100644 --- a/src/util-threshold-config.c +++ b/src/util-threshold-config.c @@ -863,7 +863,7 @@ int SCThresholdConfIsLineBlankOrComment(char *line) return 1; /* this line is neither a comment line, nor a blank line */ - if (!isspace(*line)) + if (!isspace((unsigned char)*line)) return 0; line++; @@ -892,7 +892,7 @@ int SCThresholdConfLineIsMultiline(char *line) if (*line == '\\') flag = line - rline; else - if (!isspace(*line)) + if (!isspace((unsigned char)*line)) flag = 0; line++;