mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
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:
committed by
Nikos Mavrogiannopoulos
parent
a55cf312ca
commit
05960f1751
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user