xpp: fxs: Do not increment boolean.
authorShaun Ruffell <sruffell@sruffell.net>
Fri, 10 Aug 2018 03:23:57 +0000 (22:23 -0500)
committerShaun Ruffell <sruffell@sruffell.net>
Mon, 3 Sep 2018 15:26:29 +0000 (10:26 -0500)
This quiets the following warning from gcc 7.3.0:

  drivers/dahdi/xpp/card_fxs.c:1344:17: warning: increment of a boolean
   expression [-Wbool-operation]

drivers/dahdi/xpp/card_fxs.c

index 03fcc3a..ab5f5a8 100644 (file)
@@ -1341,11 +1341,13 @@ static int FXS_card_ioctl(xpd_t *xpd, int pos, unsigned int cmd,
                if (!vmwi_ioctl) {
                        static bool notified;
 
-                       if (!notified++)
+                       if (!notified) {
+                               notified = true;
                                LINE_NOTICE(xpd, pos,
                                        "Got DAHDI_VMWI notification "
                                        "but vmwi_ioctl parameter is off. "
                                        "Ignoring.\n");
+                       }
                        return 0;
                }
                /* Digital inputs/outputs don't have VM leds */