diff options
Diffstat (limited to 'cmds/incident/main.cpp')
-rw-r--r-- | cmds/incident/main.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/cmds/incident/main.cpp b/cmds/incident/main.cpp index 519852dbe88b..cdec6a01d086 100644 --- a/cmds/incident/main.cpp +++ b/cmds/incident/main.cpp @@ -148,9 +148,19 @@ find_section(const char* name) static int get_dest(const char* arg) { - if (strcmp(arg, "LOCAL") == 0) return 0; - if (strcmp(arg, "EXPLICIT") == 0) return 1; - if (strcmp(arg, "AUTOMATIC") == 0) return 2; + if (strcmp(arg, "L") == 0 + || strcmp(arg, "LOCAL") == 0) { + return DEST_LOCAL; + } + if (strcmp(arg, "E") == 0 + || strcmp(arg, "EXPLICIT") == 0) { + return DEST_EXPLICIT; + } + if (strcmp(arg, "A") == 0 + || strcmp(arg, "AUTO") == 0 + || strcmp(arg, "AUTOMATIC") == 0) { + return DEST_AUTOMATIC; + } return -1; // return the default value } |