[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] Fix argument parsing



The switch statement was missing the default case returning
ARGP_ERR_UNKNOWN. This patch adds that.

* main.c (argp_parser): Add default case.
---
 main.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/main.c b/main.c
index 90b3e92..2bfa5c2 100644
--- a/main.c
+++ b/main.c
@@ -120,6 +120,9 @@ argp_parser (int key, char *arg, struct argp_state *state)
     case NOSUID_KEY:
       /* Ignored for compatibility with Linux' procfs. */
       ;;
+
+    default:
+      return ARGP_ERR_UNKNOWN;
   }
 
   return 0;
-- 
1.7.10.4


Reply to: