Add guard headers.
authorRoy Marples <roy@marples.name>
Wed, 11 Dec 2019 12:22:39 +0000 (12:22 +0000)
committerRoy Marples <roy@marples.name>
Wed, 11 Dec 2019 12:22:39 +0000 (12:22 +0000)
Found by LGTM.

While here, tidy configure output.

configure
src/dhcpcd-qt/dhcpcd-ifmenu.h
src/dhcpcd-qt/dhcpcd-ssidmenu.h
src/dhcpcd-qt/dhcpcd-ssidmenuwidget.h

index e36b54c84fa5f064e28879d5f13e9613a2c85d10..ed8322196ca613afe30e838fcc142cbd28e67d57 100755 (executable)
--- a/configure
+++ b/configure
@@ -431,7 +431,7 @@ if [ -z "$WITH_QT" -o "$WITH_QT" != no ]; then
                QMAKE_CONFIG="$QMAKE_CONFIG SYSCONFDIR=$SYSCONFDIR"
                QMAKE_CONFIG="$QMAKE_CONFIG MANDIR=$MANDIR"
                if (cd src/dhcpcd-qt; $QMAKE $QMAKE_CONFIG dhcpcd-qt.pro); then
-                       UI="$UI${UI+ }dhcpcd-qt"
+                       UI="$UI${UI:+ }dhcpcd-qt"
                else
                        echo "Failed to configure dhcpcd-qt" >&2
                        [ -n "$WITH_QT" ] && exit 1
index be103910bfbb656563d4ea0adbf25e76b6f204f0..b79bf42ed21ed05bf96dd6de9b46f827500ae077 100644 (file)
@@ -24,6 +24,9 @@
  * SUCH DAMAGE.
  */
 
+#ifndef DHCPCD_IFMENU
+#define        DHCPCD_IFMENU
+
 #include <QMenu>
 
 #include "dhcpcd.h"
@@ -39,3 +42,5 @@ public:
 private:
        DHCPCD_IF *ifp;
 };
+
+#endif
index 15e3d93756cb2d4ba90b02e5bf9af95a3ced0221..b583a1fb4ca421f9caf949cd37c50e58fbbd2063 100644 (file)
@@ -24,6 +24,9 @@
  * SUCH DAMAGE.
  */
 
+#ifndef DHCPCD_SSIDMENU
+#define        DHCPCD_SSIDMENU
+
 #include <QWidgetAction>
 
 #include "dhcpcd.h"
@@ -61,3 +64,5 @@ private:
        DHCPCD_WI_SCAN *scan;
        DhcpcdSsidMenuWidget *ssidWidget;
 };
+
+#endif
index caa2e443d5a042e1061cd600e503a078b662883a..673802e7d91bbd8eae6b59431de62c65a4a8c158 100644 (file)
@@ -24,6 +24,9 @@
  * SUCH DAMAGE.
  */
 
+#ifndef DHCPCD_SSIDMENUWIDGET
+#define        DHCPCD_SSIDMENUWIDGET
+
 #include <QFrame>
 
 #include "dhcpcd.h"
@@ -69,3 +72,5 @@ private:
        QLabel *encicon;
        QLabel *stricon;
 };
+
+#endif