Add default case for 'restrict-user-to-ports' switch

This fixes a compiler warning:

      CC       main-user.o
    main-user.c: In function ‘call_script’:
    main-user.c:215:7: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        if (ret < 0) {
           ^
    main-user.c:66:6: note: ‘ret’ was declared here
      int ret;
          ^

It's not really necessary because proto gets checked when the option is
parsed, but gcc doesn't know that.
This commit is contained in:
Kevin Cernekee
2016-01-24 13:11:38 -08:00
committed by Nikos Mavrogiannopoulos
parent a55cf312ca
commit 05960f1751

View File

@@ -210,6 +210,8 @@ static void export_fw_info(main_server_st *s, struct proc_st* proc)
case PROTO_ICMPv6:
ret = str_append_printf(&str_common, "icmpv6 all ");
break;
default:
ret = -1;
}
if (ret < 0) {