Fix warnings from the Clang Static Analyzer.
[oweals/tinc.git] / src / tincd.c
index a2b358052f7f17c072399ebc35e17ab344dc17bd..ed0cee9374253e756cca5fa301c19a98e6e0d1ed 100644 (file)
@@ -239,7 +239,8 @@ static bool parse_options(int argc, char **argv) {
                                        usage(true);
                                        return false;
                                }
-                               netname = strcmp(optarg, ".") != 0 ? xstrdup(optarg) : NULL;
+                               if(optarg && strcmp(optarg, "."))
+                                       netname = xstrdup(optarg);
                                break;
 
                        case 'o':                               /* option */