Warnings by checkpatch.pl.
I have fixed actual errors and left actual conscious decisions.
Signed-off-by: Dimitri Papadopoulos <3350651+DimitriPapadopoulos@users.noreply.gitlab.com>
return -ENOENT;
if (strcmp(str, match))
- ret = -EEXIST;
+ ret = -EEXIST;
free(str);
return ret;
if (xmlnode_is_named(x2, "external"))
for (x3 = x2->children; x3; x3 = x3->next)
if (xmlnode_is_named(x3, "list"))
- gateways = x3;
+ gateways = x3;
} else if (xmlnode_is_named(x, "hip-collection")) {
for (x2 = x->children; x2; x2 = x2->next) {
if (!xmlnode_get_val(x2, "hip-report-interval", &hip_interval)) {
goto replay_form;
}
} else
- break;
+ break;
}
}
/* Return early when there is a <select/> tag with no children */
if (max_choices == 0) {
- return 0;
+ return 0;
}
opt = calloc(1, sizeof(*opt));
*/
free(form->error);
if (!(form->error = strdup(_("Client certificate missing or incorrect (Certificate Validation Failure)"))))
- return -ENOMEM;
+ return -ENOMEM;
} else
vpn_progress(vpninfo, PRG_ERR, "%s\n", form->error);
}
#endif
/* Otherwise it's an OATH token of some kind. */
if (!strcmp(opt->name, "secondary_password") ||
- (form->auth_id && !strcmp(form->auth_id, "challenge")))
- return can_gen_tokencode(vpninfo, form, opt);
+ (form->auth_id && !strcmp(form->auth_id, "challenge")))
+ return can_gen_tokencode(vpninfo, form, opt);
return -EINVAL;
}
} else if (xmlnode_is_named(xml_node, "fos")) {
char platform[80], *p = platform, *e = platform + 80;
if (!xmlnode_get_prop(xml_node, "platform", &s)) {
- p+=snprintf(p, e-p, "%s", s);
- if (!xmlnode_get_prop(xml_node, "major", &s)) p+=snprintf(p, e-p, " v%s", s);
- if (!xmlnode_get_prop(xml_node, "minor", &s)) p+=snprintf(p, e-p, ".%s", s);
- if (!xmlnode_get_prop(xml_node, "patch", &s)) p+=snprintf(p, e-p, ".%s", s);
- if (!xmlnode_get_prop(xml_node, "build", &s)) p+=snprintf(p, e-p, " build %s", s);
- if (!xmlnode_get_prop(xml_node, "branch", &s)) snprintf(p, e-p, " branch %s", s);
- vpn_progress(vpninfo, PRG_INFO,
- _("Reported platform is %s\n"), platform);
+ p+=snprintf(p, e-p, "%s", s);
+ if (!xmlnode_get_prop(xml_node, "major", &s)) p+=snprintf(p, e-p, " v%s", s);
+ if (!xmlnode_get_prop(xml_node, "minor", &s)) p+=snprintf(p, e-p, ".%s", s);
+ if (!xmlnode_get_prop(xml_node, "patch", &s)) p+=snprintf(p, e-p, ".%s", s);
+ if (!xmlnode_get_prop(xml_node, "build", &s)) p+=snprintf(p, e-p, " build %s", s);
+ if (!xmlnode_get_prop(xml_node, "branch", &s)) snprintf(p, e-p, " branch %s", s);
+ vpn_progress(vpninfo, PRG_INFO,
+ _("Reported platform is %s\n"), platform);
}
} else if (xmlnode_is_named(xml_node, "ipv4")) {
for (x = xml_node->children; x; x=x->next) {
char *res;
if (config_file || is_arg_utf8(config_arg))
- return xstrdup(config_arg);
+ return xstrdup(config_arg);
res = convert_arg_to_utf8(argv, config_arg);
/* Force a copy, even if conversion failed */
if (!err)
return 0;
else if (err < 0) {
- vpn_progress(vpninfo, PRG_ERR,
- _("Could not check server's certificate against %s\n"),
- this->fingerprint);
+ vpn_progress(vpninfo, PRG_ERR,
+ _("Could not check server's certificate against %s\n"),
+ this->fingerprint);
}
}
}
/* FIXME: Actually lock the file */
err = openconnect_read_file(vpninfo, token_filename, &file_token);
if (err < 0)
- return err;
+ return err;
err = openconnect_set_token_mode(vpninfo, vpninfo->token_mode, file_token);
free(file_token);
if (!attrlen)
goto badlen;
if (!data[attrlen-1])
- attrlen--;
+ attrlen--;
vpn_progress(vpninfo, PRG_DEBUG, _("Received DNS search domain %.*s\n"),
attrlen, (char *)data);
new_ip_info->domain = add_option_dup(new_opts, "search", (char *)data, attrlen);
if (vpninfo->ip_info.netmask6 && !vpninfo->ip_info.addr6) {
char *slash = strchr(vpninfo->ip_info.netmask6, '/');
if (slash)
- script_setenv(vpninfo, "INTERNAL_IP6_ADDRESS", vpninfo->ip_info.netmask6,
- slash - vpninfo->ip_info.netmask6, 0);
+ script_setenv(vpninfo, "INTERNAL_IP6_ADDRESS", vpninfo->ip_info.netmask6,
+ slash - vpninfo->ip_info.netmask6, 0);
}
if (vpninfo->ip_info.dns[0])