diff --git a/fanout.c b/fanout.c
index f108f7b6a25728601f4696b8143b87c84b318942..8f7401f8dce74bd31a874963e7044bedd811019d 100644
--- a/fanout.c
+++ b/fanout.c
@@ -317,7 +317,7 @@ xit\n");
         exit (EXIT_FAILURE);
     }
 
-    if ( ! portno > 0) {
+    if ( ! (portno > 0)) {
         fanout_debug (0, "ERROR invalid port\n");
         exit (EXIT_FAILURE);
     }