From: Daniel Lenski Date: Sat, 8 Apr 2017 23:58:46 +0000 (-0700) Subject: openconnect_get_supported_protocols should return the number of protocols X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e8e4b7d77874c39bb54ca35372bf278300b74b8a;p=users%2Fdwmw2%2Fopenconnect.git openconnect_get_supported_protocols should return the number of protocols --- diff --git a/library.c b/library.c index 86b524ab..48f458ac 100644 --- a/library.c +++ b/library.c @@ -178,7 +178,7 @@ int openconnect_get_supported_protocols(struct oc_vpn_proto **protos) pr->description = _(p->description); pr->flags = p->flags; } - return 0; + return (p - openconnect_protos); } void openconnect_free_supported_protocols(struct oc_vpn_proto *protos)