]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
coverty: fix dead code warning
authorVictor Julien <victor@inliniac.net>
Tue, 3 May 2016 08:29:05 +0000 (10:29 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 3 May 2016 08:29:05 +0000 (10:29 +0200)
src/util-device.c

index f58bbc35a88eb822f7c9188b17bf7e4396ba7a8b..a4e634ee0c669f2dc18a559d0bff0ca58bbd8685 100644 (file)
@@ -126,10 +126,10 @@ int LiveSafeDeviceName(const char *devname, char *newdevname, size_t destlen)
          * max length of pthread names (15 chars) and we use 3 chars
          * for the threadname indicator eg. "W#-" and one-two chars for
          * the thread number. And if the destination buffer is under
-         * 6 chars there is point in shortening it since we must at
-         * lest enter two periodes (.) into the string..
+         * 6 chars there is no point in shortening it since we must at
+         * least enter two periods (.) into the string.
          */
-        if ((destlen-1) > 10 && (destlen-1) < 6) {
+        if ((destlen-1) > 10 || (destlen-1) < 6) {
             return 1;
         }