From: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> Date: Mon, 23 Jun 2025 11:56:25 +0000 (+0200) Subject: Fix indentation X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e66f81ee375981f2ad47b08524dd283a09cfa479;p=users%2Fdwmw2%2Fopenconnect.git Fix indentation Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> --- diff --git a/array.c b/array.c index e7ee2e40..7409e16e 100644 --- a/array.c +++ b/array.c @@ -48,37 +48,37 @@ static struct oc_auth_form *plain_auth_form(void) { - struct oc_auth_form *form; - struct oc_form_opt *opt, *opt2, *opt3; - - form = calloc(1, sizeof(*form)); - if (!form) { - nomem: - free_auth_form(form); - return NULL; - } + struct oc_auth_form *form; + struct oc_form_opt *opt, *opt2, *opt3; + + form = calloc(1, sizeof(*form)); + if (!form) { + nomem: + free_auth_form(form); + return NULL; + } form->auth_id = strdup("form"); - opt = form->opts = calloc(1, sizeof(*opt)); - if (!opt) - goto nomem; - opt->label = strdup("authgroup:"); - opt->name = strdup("method"); - opt->type = OC_FORM_OPT_TEXT; - - opt2 = opt->next = calloc(1, sizeof(*opt2)); - if (!opt2) - goto nomem; - opt2->label = strdup("username:"); - opt2->name = strdup("uname"); - opt2->type = OC_FORM_OPT_TEXT; - - opt3 = opt2->next = calloc(1, sizeof(*opt3)); - if (!opt3) - goto nomem; - opt3->label = strdup("password:"); - opt3->name = strdup("pwd"); - opt3->type = OC_FORM_OPT_PASSWORD; - return form; + opt = form->opts = calloc(1, sizeof(*opt)); + if (!opt) + goto nomem; + opt->label = strdup("authgroup:"); + opt->name = strdup("method"); + opt->type = OC_FORM_OPT_TEXT; + + opt2 = opt->next = calloc(1, sizeof(*opt2)); + if (!opt2) + goto nomem; + opt2->label = strdup("username:"); + opt2->name = strdup("uname"); + opt2->type = OC_FORM_OPT_TEXT; + + opt3 = opt2->next = calloc(1, sizeof(*opt3)); + if (!opt3) + goto nomem; + opt3->label = strdup("password:"); + opt3->name = strdup("pwd"); + opt3->type = OC_FORM_OPT_PASSWORD; + return form; } int array_obtain_cookie(struct openconnect_info *vpninfo) @@ -89,8 +89,8 @@ int array_obtain_cookie(struct openconnect_info *vpninfo) struct oc_text_buf *req_buf = buf_alloc(); int ret; - if ((ret = buf_error(req_buf))) - goto out; + if ((ret = buf_error(req_buf))) + goto out; do { ret = process_auth_form(vpninfo, form); @@ -131,10 +131,10 @@ int array_obtain_cookie(struct openconnect_info *vpninfo) ret = -EPERM; out: - if (form) free_auth_form(form); - if (req_buf) buf_free(req_buf); + if (form) free_auth_form(form); + if (req_buf) buf_free(req_buf); printf("obtain return %d\n", ret); - return ret; + return ret; } /* XXX: Lifted from oncp.c. Share it. */ @@ -487,7 +487,7 @@ static int parse_interface_info(struct openconnect_info *vpninfo, out: if (ret) { free_optlist(new_opts); - free_split_routes(&new_ip_info); + free_split_routes(&new_ip_info); } return ret; } diff --git a/auth-globalprotect.c b/auth-globalprotect.c index 7540a4b6..98d76450 100644 --- a/auth-globalprotect.c +++ b/auth-globalprotect.c @@ -253,7 +253,7 @@ static int challenge_cb(struct openconnect_info *vpninfo, char *prompt, char *in * Currently using the heuristic that if the password field in * the preceding form wasn't treated as a token field, treat this * as a token field. - */ + */ if (!can_gen_tokencode(vpninfo, form, opt2) && opt2->type == OC_FORM_OPT_PASSWORD) opt2->type = OC_FORM_OPT_TOKEN; else @@ -486,7 +486,7 @@ static int parse_portal_xml(struct openconnect_info *vpninfo, xmlNode *xml_node, * or repeated --servercert in order to allow non-interactive * authentication to gateways whose certs aren't trusted by the * system but ARE trusted by the portal (see example at - * https://github.com/dlenski/openconnect/issues/128). + * https://github.com/dlenski/openconnect/issues/128). */ if (xmlnode_is_named(xml_node, "policy")) { for (x = xml_node->children; x; x = x->next) { @@ -810,7 +810,7 @@ int gpst_obtain_cookie(struct openconnect_info *vpninfo) int result; /* An alternate password/secret field may be specified in the "URL path" (or --usergroup). - * Known possibilities are: + * Known possibilities are: * /portal:portal-userauthcookie * /gateway:prelogin-cookie */ diff --git a/auth-juniper.c b/auth-juniper.c index 2ff0448b..814412cd 100644 --- a/auth-juniper.c +++ b/auth-juniper.c @@ -114,7 +114,7 @@ int oncp_send_tncc_command(struct openconnect_info *vpninfo, int start) return -EIO; } - /* Mainloop timers need to know the last Trojan was invoked */ + /* Mainloop timers need to know the last Trojan was invoked */ vpninfo->last_trojan = time(NULL); return buf_free(buf); } diff --git a/auth.c b/auth.c index cf12ea29..ec17c296 100644 --- a/auth.c +++ b/auth.c @@ -1277,19 +1277,19 @@ static int run_csd_script(struct openconnect_info *vpninfo, char *buf, int bufle return ret; } else { - /* in child: will be reaped by init */ - char scertbuf[MD5_SIZE * 2 + 1]; - char ccertbuf[MD5_SIZE * 2 + 1]; - char *csd_argv[32]; - int i = 0; - - if (set_csd_user(vpninfo) < 0) - exit(1); - if (getuid() == 0 && !vpninfo->csd_wrapper) { - fprintf(stderr, _("Warning: you are running insecure CSD code with root privileges\n" - "\t Use command line option \"--csd-user\"\n")); - } - /* + /* in child: will be reaped by init */ + char scertbuf[MD5_SIZE * 2 + 1]; + char ccertbuf[MD5_SIZE * 2 + 1]; + char *csd_argv[32]; + int i = 0; + + if (set_csd_user(vpninfo) < 0) + exit(1); + if (getuid() == 0 && !vpninfo->csd_wrapper) { + fprintf(stderr, _("Warning: you are running insecure CSD code with root privileges\n" + "\t Use command line option \"--csd-user\"\n")); + } + /* * Spurious stdout output from the CSD trojan will break both * the NM tool and the various cookieonly modes. * Also, gnome-shell *closes* stderr so attempt to cope with that @@ -1304,50 +1304,50 @@ static int run_csd_script(struct openconnect_info *vpninfo, char *buf, int bufle close(nulfd); } } - dup2(2, 1); - if (vpninfo->csd_wrapper) - csd_argv[i++] = openconnect_utf8_to_legacy(vpninfo, - vpninfo->csd_wrapper); - csd_argv[i++] = fname; - csd_argv[i++] = (char *)"-ticket"; - if (asprintf(&csd_argv[i++], "\"%s\"", vpninfo->csd_ticket) == -1) - goto out; - csd_argv[i++] = (char *)"-stub"; - csd_argv[i++] = (char *)"\"0\""; - csd_argv[i++] = (char *)"-group"; - if (asprintf(&csd_argv[i++], "\"%s\"", vpninfo->authgroup?:"") == -1) - goto out; - - openconnect_local_cert_md5(vpninfo, ccertbuf); - scertbuf[0] = 0; - get_cert_md5_fingerprint(vpninfo, vpninfo->peer_cert, scertbuf); - csd_argv[i++] = (char *)"-certhash"; - if (asprintf(&csd_argv[i++], "\"%s:%s\"", scertbuf, ccertbuf) == -1) - goto out; - - - csd_argv[i++] = (char *)"-url"; - if (asprintf(&csd_argv[i++], "\"https://%s%s\"", openconnect_get_hostname(vpninfo), vpninfo->csd_starturl) == -1) - goto out; - - csd_argv[i++] = (char *)"-langselen"; - csd_argv[i++] = NULL; - - if (setenv("CSD_SHA256", openconnect_get_peer_cert_hash(vpninfo)+11, 1)) /* remove initial 'pin-sha256:' */ - goto out; - if (setenv("CSD_TOKEN", vpninfo->csd_token, 1)) - goto out; - if (setenv("CSD_HOSTNAME", openconnect_get_hostname(vpninfo), 1)) - goto out; - - apply_script_env(vpninfo->csd_env); - - execv(csd_argv[0], csd_argv); - - out: - vpn_progress(vpninfo, PRG_ERR, - _("Failed to exec CSD script %s\n"), vpninfo->csd_wrapper ?: fname); - exit(1); + dup2(2, 1); + if (vpninfo->csd_wrapper) + csd_argv[i++] = openconnect_utf8_to_legacy(vpninfo, + vpninfo->csd_wrapper); + csd_argv[i++] = fname; + csd_argv[i++] = (char *)"-ticket"; + if (asprintf(&csd_argv[i++], "\"%s\"", vpninfo->csd_ticket) == -1) + goto out; + csd_argv[i++] = (char *)"-stub"; + csd_argv[i++] = (char *)"\"0\""; + csd_argv[i++] = (char *)"-group"; + if (asprintf(&csd_argv[i++], "\"%s\"", vpninfo->authgroup?:"") == -1) + goto out; + + openconnect_local_cert_md5(vpninfo, ccertbuf); + scertbuf[0] = 0; + get_cert_md5_fingerprint(vpninfo, vpninfo->peer_cert, scertbuf); + csd_argv[i++] = (char *)"-certhash"; + if (asprintf(&csd_argv[i++], "\"%s:%s\"", scertbuf, ccertbuf) == -1) + goto out; + + + csd_argv[i++] = (char *)"-url"; + if (asprintf(&csd_argv[i++], "\"https://%s%s\"", openconnect_get_hostname(vpninfo), vpninfo->csd_starturl) == -1) + goto out; + + csd_argv[i++] = (char *)"-langselen"; + csd_argv[i++] = NULL; + + if (setenv("CSD_SHA256", openconnect_get_peer_cert_hash(vpninfo)+11, 1)) /* remove initial 'pin-sha256:' */ + goto out; + if (setenv("CSD_TOKEN", vpninfo->csd_token, 1)) + goto out; + if (setenv("CSD_HOSTNAME", openconnect_get_hostname(vpninfo), 1)) + goto out; + + apply_script_env(vpninfo->csd_env); + + execv(csd_argv[0], csd_argv); + + out: + vpn_progress(vpninfo, PRG_ERR, + _("Failed to exec CSD script %s\n"), vpninfo->csd_wrapper ?: fname); + exit(1); } #endif /* !_WIN32 && !__native_client__ */ diff --git a/compat.c b/compat.c index b00ac83e..e5593d9a 100644 --- a/compat.c +++ b/compat.c @@ -30,16 +30,16 @@ #include /* errno_t, size_t */ #ifndef HAVE_GETENV_S_DECL errno_t getenv_s( - size_t *ret_required_buf_size, - char *buf, - size_t buf_size_in_bytes, - const char *name + size_t *ret_required_buf_size, + char *buf, + size_t buf_size_in_bytes, + const char *name ); #endif #ifndef HAVE_PUTENV_S_DECL errno_t _putenv_s( - const char *varname, - const char *value_string + const char *varname, + const char *value_string ); #endif #endif diff --git a/dtls.c b/dtls.c index 6e167126..427109e8 100644 --- a/dtls.c +++ b/dtls.c @@ -555,17 +555,17 @@ static int probe_mtu(struct openconnect_info *vpninfo, unsigned char *buf) gettimeofday(&now_tv, NULL); if (now_tv.tv_sec > start_tv.tv_sec + 10) { - if (absolute_min == min) { - /* Hm, we never got *anything* back successfully? */ - vpn_progress(vpninfo, PRG_ERR, - _("Too long time in MTU detect loop; assuming negotiated MTU.\n")); - goto fail; - } else { - vpn_progress(vpninfo, PRG_ERR, - _("Too long time in MTU detect loop; MTU set to %d.\n"), min); + if (absolute_min == min) { + /* Hm, we never got *anything* back successfully? */ + vpn_progress(vpninfo, PRG_ERR, + _("Too long time in MTU detect loop; assuming negotiated MTU.\n")); + goto fail; + } else { + vpn_progress(vpninfo, PRG_ERR, + _("Too long time in MTU detect loop; MTU set to %d.\n"), min); ret = min; goto out; - } + } } diff --git a/f5.c b/f5.c index 0d53ab42..87d386ad 100644 --- a/f5.c +++ b/f5.c @@ -533,7 +533,7 @@ static int parse_options(struct openconnect_info *vpninfo, char *buf, int len, int st = xmlnode_bool_or_int_value(xml_node); vpn_progress(vpninfo, PRG_INFO, _("Got SplitTunneling0 value of %d\n"), st); /* XX: Should we ignore split-{in,ex}cludes if this is zero? */ - } + } /* XX: This is an objectively stupid way to use XML, a hierarchical data format. */ else if ( (!strncmp((char *)xml_node->name, "DNS", 3) && isdigit(xml_node->name[3])) || (!strncmp((char *)xml_node->name, "DNS6_", 5) && isdigit(xml_node->name[5])) ) { @@ -626,7 +626,7 @@ static int parse_options(struct openconnect_info *vpninfo, char *buf, int len, if (ret || (*ipv4 < 1 && *ipv6 < 1) || !*ur_z || !*session_id) { free_optlist(new_opts); - free_split_routes(&new_ip_info); + free_split_routes(&new_ip_info); err: vpn_progress(vpninfo, PRG_ERR, _("Failed to find VPN options\n")); @@ -661,8 +661,8 @@ static int get_ip_address(struct openconnect_info *vpninfo, char *header, char * if (!vpninfo->ip_info.addr6 && !vpninfo->ip_info.netmask6) inet_pton(AF_INET6, val, &ppp->out_ipv6_addr); } - /* XX: The server's IP address(es) X-VPN-server-{IP,IPv6} are also - * sent, but the utility of these is unclear. As remarked in oncp.c, + /* XX: The server's IP address(es) X-VPN-server-{IP,IPv6} are also + * sent, but the utility of these is unclear. As remarked in oncp.c, * "this is a tunnel; having a gateway is meaningless." */ return 0; } diff --git a/gnutls-dtls.c b/gnutls-dtls.c index 50a4bb4e..c8827918 100644 --- a/gnutls-dtls.c +++ b/gnutls-dtls.c @@ -347,7 +347,7 @@ static int start_dtls_anon_handshake(struct openconnect_info *vpninfo, gnutls_se * precisely the same cert that we get from the HTTPS service, * but we tried that for EAP-TTLS in the Pulse protocol and the * theory was disproven, so we ended up doing this there too. - */ + */ gnutls_credentials_set(dtls_ssl, GNUTLS_CRD_CERTIFICATE, vpninfo->https_cred); /* The F5 BIG-IP server before v16, will crap itself if we diff --git a/gnutls.c b/gnutls.c index d0c3acde..0ac66226 100644 --- a/gnutls.c +++ b/gnutls.c @@ -2376,31 +2376,31 @@ int openconnect_open_https(struct openconnect_info *vpninfo) vpninfo->hostname, strlen(vpninfo->hostname)); - /* - * If a ClientHello is between 256 and 511 bytes, the - * server cannot distinguish between a SSLv2 formatted - * packet and a SSLv3 formatted packet. - * - * F5 BIG-IP reverse proxies in particular will - * silently drop an ambiguous ClientHello. - * - * GnuTLS fixes this in v3.2.9+ by padding ClientHello - * packets to at least 512 bytes if %COMPAT or %DUMBFW - * is specified. - * - * Discussion: - * https://www.ietf.org/mail-archive/web/tls/current/msg10423.html - * - * GnuTLS commits: - * b6d29bb1737f96ac44a8ef9cc9fe7f9837e20465 - * a9bd8c4d3a639c40adb964349297f891f583a21b - * 531bec47037e882af32963f8461988f8c724919e - * 7c45ebbdd877cd994b6b938bd6faef19558a01e1 - * 8d28901a3ebd2589d0fc9941475d50f04047f6fe - * 28065ce3896b1b0f87972d0bce9b17641ebb69b9 - */ - - if (!vpninfo->ciphersuite_config) { + /* + * If a ClientHello is between 256 and 511 bytes, the + * server cannot distinguish between a SSLv2 formatted + * packet and a SSLv3 formatted packet. + * + * F5 BIG-IP reverse proxies in particular will + * silently drop an ambiguous ClientHello. + * + * GnuTLS fixes this in v3.2.9+ by padding ClientHello + * packets to at least 512 bytes if %COMPAT or %DUMBFW + * is specified. + * + * Discussion: + * https://www.ietf.org/mail-archive/web/tls/current/msg10423.html + * + * GnuTLS commits: + * b6d29bb1737f96ac44a8ef9cc9fe7f9837e20465 + * a9bd8c4d3a639c40adb964349297f891f583a21b + * 531bec47037e882af32963f8461988f8c724919e + * 7c45ebbdd877cd994b6b938bd6faef19558a01e1 + * 8d28901a3ebd2589d0fc9941475d50f04047f6fe + * 28065ce3896b1b0f87972d0bce9b17641ebb69b9 + */ + + if (!vpninfo->ciphersuite_config) { struct oc_text_buf *buf = buf_alloc(); #ifdef DEFAULT_PRIO buf_append(buf, "%s", DEFAULT_PRIO ":%COMPAT"); @@ -2444,7 +2444,7 @@ int openconnect_open_https(struct openconnect_info *vpninfo) vpninfo->ciphersuite_config = buf->data; buf->data = NULL; buf_free(buf); - } + } err = gnutls_priority_set_direct(vpninfo->https_sess, vpninfo->ciphersuite_config, NULL); diff --git a/gpst.c b/gpst.c index c9445874..cb17bcd4 100644 --- a/gpst.c +++ b/gpst.c @@ -1089,10 +1089,10 @@ int gpst_setup(struct openconnect_info *vpninfo) if (ret) goto out; - /* XX: last_trojan is used both as a sentinel to detect the - * first time we check/submit HIP, and for the mainloop to timeout - * when periodic re-checking is required. - */ + /* XX: last_trojan is used both as a sentinel to detect the + * first time we check/submit HIP, and for the mainloop to timeout + * when periodic re-checking is required. + */ vpninfo->last_trojan = time(NULL); /* Default HIP re-checking to 3600 seconds unless already set by diff --git a/gssapi.c b/gssapi.c index cf5df1e3..837aa69d 100644 --- a/gssapi.c +++ b/gssapi.c @@ -50,7 +50,7 @@ static void print_gss_err(struct openconnect_info *vpninfo, const char *where, static const char spnego_OID[] = "\x2b\x06\x01\x05\x05\x02"; static const gss_OID_desc gss_mech_spnego = { - 6, + 6, (void *)&spnego_OID }; diff --git a/http.c b/http.c index 702b6ffa..208c876e 100644 --- a/http.c +++ b/http.c @@ -686,13 +686,13 @@ int handle_redirect(struct openconnect_info *vpninfo) free(vpninfo->redirect_url); vpninfo->redirect_url = NULL; return 0; - } else if (vpninfo->redirect_url[0] == '/') { - /* Absolute redirect within same host */ - free(vpninfo->urlpath); - vpninfo->urlpath = strdup(vpninfo->redirect_url + 1); - free(vpninfo->redirect_url); - vpninfo->redirect_url = NULL; - return 0; + } else if (vpninfo->redirect_url[0] == '/') { + /* Absolute redirect within same host */ + free(vpninfo->urlpath); + vpninfo->urlpath = strdup(vpninfo->redirect_url + 1); + free(vpninfo->redirect_url); + vpninfo->redirect_url = NULL; + return 0; } else if (strstr(vpninfo->redirect_url, "://")) { vpn_progress(vpninfo, PRG_ERR, _("Cannot follow redirection to non-https URL '%s'\n"), diff --git a/library.c b/library.c index d5021594..6fbe2d10 100644 --- a/library.c +++ b/library.c @@ -282,12 +282,12 @@ int openconnect_get_supported_protocols(struct oc_vpn_proto **protos) struct oc_vpn_proto *pr; int i, j; - /* The original version of this function included an all-zero - * sentinel value at the end of the array, so we must continue - * to do so for ABI compatibility even though it's - * functionally redundant as a marker of the array's length, - * along with the explicit length in the return value. - */ + /* The original version of this function included an all-zero + * sentinel value at the end of the array, so we must continue + * to do so for ABI compatibility even though it's + * functionally redundant as a marker of the array's length, + * along with the explicit length in the return value. + */ *protos = pr = calloc(NR_PROTOS + 1, sizeof(*pr)); if (!pr) return -ENOMEM; @@ -1485,7 +1485,7 @@ const char *openconnect_get_dtls_cipher(struct openconnect_info *vpninfo) return NULL; #endif } - return vpninfo->dtls_cipher_desc; + return vpninfo->dtls_cipher_desc; } int openconnect_set_csd_environ(struct openconnect_info *vpninfo, diff --git a/main.c b/main.c index be0e3cd7..e088ea5f 100644 --- a/main.c +++ b/main.c @@ -737,7 +737,7 @@ static void print_supported_protocols(void) int n; n = openconnect_get_supported_protocols(&protos); - if (n>=0) { + if (n>=0) { printf(_("Supported protocols:")); for (p=protos; n; p++, n--) { printf("%s%s%s", sep, p->name, p==protos ? _(" (default)") : ""); @@ -754,7 +754,7 @@ static void print_supported_protocols_usage(void) int n; n = openconnect_get_supported_protocols(&protos); - if (n>=0) { + if (n>=0) { printf("\n%s:\n", _("Set VPN protocol")); for (p=protos; n; p++, n--) printf(" --protocol=%-16s %s%s\n", diff --git a/mtucalc.c b/mtucalc.c index 3c5ef389..9db13d03 100644 --- a/mtucalc.c +++ b/mtucalc.c @@ -89,7 +89,7 @@ int calculate_mtu(struct openconnect_info *vpninfo, int is_udp, vpn_progress(vpninfo, PRG_TRACE, _("Using base_mtu of %d\n"), base_mtu); - /* base_mtu is now (we hope) the PMTU between our external network interface + /* base_mtu is now (we hope) the PMTU between our external network interface * and the VPN gateway */ if (!mtu) { @@ -106,7 +106,7 @@ int calculate_mtu(struct openconnect_info *vpninfo, int is_udp, vpn_progress(vpninfo, PRG_TRACE, _("After removing %s/IPv%d headers, MTU of %d\n"), (is_udp ? "UDP" : "TCP"), vpninfo->peer_addr->sa_family == AF_INET6 ? 6 : 4, mtu); - /* MTU is now (we hope) the number of payload bytes that can fit in a UDP or + /* MTU is now (we hope) the number of payload bytes that can fit in a UDP or * TCP packet exchanged with the VPN gateway. */ mtu -= unpadded_overhead; /* remove protocol-specific overhead that isn't affected by padding */ diff --git a/ntlm.c b/ntlm.c index 01f0aff8..3e9a4212 100644 --- a/ntlm.c +++ b/ntlm.c @@ -47,10 +47,10 @@ static int ntlm_sspi(struct openconnect_info *vpninfo, int proxy, struct http_auth_state *auth_state, struct oc_text_buf *buf, const char *challenge) { - SECURITY_STATUS status; - SecBufferDesc input_desc, output_desc; - SecBuffer in_token, out_token; - ULONG ret_flags; + SECURITY_STATUS status; + SecBufferDesc input_desc, output_desc; + SecBuffer in_token, out_token; + ULONG ret_flags; if (challenge) { int token_len = -EINVAL; @@ -66,13 +66,13 @@ static int ntlm_sspi(struct openconnect_info *vpninfo, int proxy, in_token.cbBuffer = token_len; } - output_desc.cBuffers = 1; - output_desc.pBuffers = &out_token; - output_desc.ulVersion = SECBUFFER_VERSION; + output_desc.cBuffers = 1; + output_desc.pBuffers = &out_token; + output_desc.ulVersion = SECBUFFER_VERSION; - out_token.BufferType = SECBUFFER_TOKEN; - out_token.cbBuffer = 0; - out_token.pvBuffer = NULL; + out_token.BufferType = SECBUFFER_TOKEN; + out_token.cbBuffer = 0; + out_token.pvBuffer = NULL; status = InitializeSecurityContextW(&auth_state->ntlm_sspi_cred, challenge ? &auth_state->ntlm_sspi_ctx : NULL, @@ -102,7 +102,7 @@ static int ntlm_helper_spawn(struct openconnect_info *vpninfo, int proxy, struct http_auth_state *auth_state, struct oc_text_buf *buf) { - SECURITY_STATUS status; + SECURITY_STATUS status; int ret; status = AcquireCredentialsHandleW(NULL, (SEC_WCHAR *)L"NTLM", @@ -738,7 +738,7 @@ static void setup_schedule (const unsigned char *key_56, DES_KS ks) #define LM_PASSWORD_MAGIC "\x4B\x47\x53\x21\x40\x23\x24\x25" \ "\x4B\x47\x53\x21\x40\x23\x24\x25" \ - "\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00" static void ntlm_lanmanager_hash (const char *password, char hash[21]) { diff --git a/openssl-dtls.c b/openssl-dtls.c index 00d1fd99..03d998c1 100644 --- a/openssl-dtls.c +++ b/openssl-dtls.c @@ -318,7 +318,7 @@ static unsigned int psk_callback(SSL *ssl, const char *hint, char *identity, #ifndef HAVE_SSL_CIPHER_FIND static const SSL_CIPHER *SSL_CIPHER_find(SSL *ssl, const unsigned char *ptr) { - return ssl->method->get_cipher_by_char(ptr); + return ssl->method->get_cipher_by_char(ptr); } #endif diff --git a/ppp.c b/ppp.c index 7875ab8d..e01ed719 100644 --- a/ppp.c +++ b/ppp.c @@ -630,7 +630,7 @@ static int queue_config_request(struct openconnect_info *vpninfo, int proto) } out: - buf_free(buf); + buf_free(buf); return ret; } @@ -790,7 +790,7 @@ static int handle_config_packet(struct openconnect_info *vpninfo, len = load_be16(p + 2); } - if (code > 0 && code <= 11) + if (code > 0 && code <= 11) vpn_progress(vpninfo, PRG_TRACE, _("Received %s/id %d %s from server\n"), proto_names(proto), id, lcp_names[code]); switch (code) { case CONFREQ: