]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
datasets: remove useless variables
authorVictor Julien <victor@inliniac.net>
Fri, 17 Apr 2020 12:58:06 +0000 (14:58 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 20 Apr 2020 11:57:28 +0000 (13:57 +0200)
src/datasets.c

index f68ed2e441dfe320b105e2b2b29dfaf42b16a426..c18ef449f661a6f83f0ef32fff555b092edc0039 100644 (file)
@@ -368,7 +368,6 @@ static void DatasetGetPath(const char *in_path,
 {
     char path[PATH_MAX];
     struct stat st;
-    int ret;
 
     if (PathIsAbsolute(in_path)) {
         strlcpy(path, in_path, sizeof(path));
@@ -377,7 +376,7 @@ static void DatasetGetPath(const char *in_path,
     }
 
     const char *data_dir = ConfigGetDataDirectory();
-    if ((ret = stat(data_dir, &st)) != 0) {
+    if (stat(data_dir, &st) != 0) {
         SCLogDebug("data-dir '%s': %s", data_dir, strerror(errno));
         return;
     }
@@ -385,7 +384,7 @@ static void DatasetGetPath(const char *in_path,
     snprintf(path, sizeof(path), "%s/%s", data_dir, in_path); // TODO WINDOWS
 
     if (type == TYPE_LOAD) {
-        if ((ret = stat(path, &st)) != 0) {
+        if (stat(path, &st) != 0) {
             SCLogDebug("path %s: %s", path, strerror(errno));
             if (!g_system) {
                 snprintf(path, sizeof(path), "%s", in_path);