Clang reports possible null pointer of optarg as argument to strtoul. Fix it by adding ovs_assert check.
Signed-off-by: William Tu <[email protected]> --- utilities/ovs-ofctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 5b7f1b02104f..05c5995fa775 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -262,6 +262,7 @@ parse_options(int argc, char *argv[]) switch (c) { case 't': + ovs_assert(optarg); timeout = strtoul(optarg, NULL, 10); if (timeout <= 0) { ovs_fatal(0, "value %s on -t or --timeout is not at least 1", -- 2.7.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
