diff --git a/src/config.h b/src/config.h index 5e7a567962b8bc74d7c0fb781d97cda39f636fef..5e70dd8a616aa06750acf869692e1a20bd588fc0 100644 --- a/src/config.h +++ b/src/config.h @@ -108,7 +108,8 @@ int parse_min_tls(const char *str); int load_config(struct vpn_config *cfg, const char *filename); void destroy_vpn_config(struct vpn_config *cfg); -/** merge source config into dest +/* + * merge source config into dest * * memory allocated dynamically is transferred with this function * e.g. ownership goes to dest config diff --git a/src/http.c b/src/http.c index c29d0d87bce202a210da46ffc1ff3b7d4a744472..0dca6a58f6cce258205c9e35f342f2139c7ccf33 100644 --- a/src/http.c +++ b/src/http.c @@ -188,8 +188,7 @@ int http_receive( } if (header_size) { - /* We saw the whole header, */ - /* let's check if the body is done as well */ + /* We saw the whole header, is the body done as well? */ if (chunked) { /* Last chunk terminator. Done naively. */ if (bytes_read >= 7 && @@ -427,7 +426,8 @@ int try_otp_auth( return -1; strncpy(path, s, e - s); path[e - s] = '\0'; - /* Try to get password prompt, assume it starts with 'Please' + /* + * Try to get password prompt, assume it starts with 'Please' * Fall back to default prompt if not found/parseable */ p = strstr(s, "Please"); @@ -452,7 +452,8 @@ int try_otp_auth( /* Search for all inputs */ while ((s = strcasestr(s, "<INPUT"))) { s += 6; - /* check if we found parameters for a later INPUT + /* + * check if we found parameters for a later INPUT * during last round */ if (s < t || s < n || (v && s < v)) @@ -467,10 +468,12 @@ int try_otp_auth( n += 6; t += 6; if (strncmp(t, "hidden", 6) == 0 || strncmp(t, "password", 8) == 0) { - /* We try to be on the safe side + /* + * We try to be on the safe side * and URL-encode the variable name + * + * Append '&' if we found something in last round */ - /* Append '&' if we found something in last round */ if (d > data) { if (!SPACE_AVAILABLE(1)) return -1; @@ -612,7 +615,8 @@ int auth_log_in(struct tunnel *tunnel) if (ret == ERR_HTTP_NO_COOKIE) { struct vpn_config *cfg = tunnel->config; - /* If the response body includes a tokeninfo= parameter, + /* + * If the response body includes a tokeninfo= parameter, * it means the VPN gateway expects two-factor authentication. * It sends a one-time authentication credential for example * by email or SMS, and expects to receive it back in the diff --git a/src/ipv4.c b/src/ipv4.c index 77e10b11b91f0b1a2d2e79d97005831dd4310646..90803aed85a5180829f3fbc3a78d8f9a8b16651b 100644 --- a/src/ipv4.c +++ b/src/ipv4.c @@ -122,7 +122,8 @@ static int ipv4_get_route(struct rtentry *route) uint32_t rtdest, rtmask, rtgtw; int rtfound = 0; - /* initialize the buffer with zeroes, aiming to address the + /* + * initialize the buffer with zeroes, aiming to address the * coverity issue "TAINTED_SCALAR passed to a tainted sink" * * Later on, the routing table is read into this buffer using diff --git a/src/ipv4.h b/src/ipv4.h index 78ccb94c64e25aaa3212a669a17a3bbde6b63a91..044907d981722d2943b0d13eab4eef478e8009dd 100644 --- a/src/ipv4.h +++ b/src/ipv4.h @@ -33,7 +33,8 @@ #endif #if !HAVE_RT_ENTRY_WITH_RT_DST -/* On Mac OS X and FreeBSD struct rtentry is not directly available. +/* + * On Mac OS X and FreeBSD struct rtentry is not directly available. * On FreeBSD one could #define _WANT_RTENTRY but the struct does not * contain rt_dst for instance. The entries for mask and destination * are maintained in a separate radix_tree structure by the routing diff --git a/src/tunnel.c b/src/tunnel.c index f150a84042c176224eb36a182615e588e83e3dd7..7f5a64d241c56047091d5a4f9a409aeec84ac78a 100644 --- a/src/tunnel.c +++ b/src/tunnel.c @@ -188,11 +188,11 @@ static int pppd_run(struct tunnel *tunnel) #if HAVE_USR_SBIN_PPP /* - * assume there is a default configuration to start. - * Support for taking options from the command line - * e.g. the name of the configuration or options - * to send interactively to ppp will be added later - */ + * assume there is a default configuration to start. + * Support for taking options from the command line + * e.g. the name of the configuration or options + * to send interactively to ppp will be added later + */ const char *v[] = { ppp_path, "-direct" @@ -240,8 +240,10 @@ static int pppd_run(struct tunnel *tunnel) if (ofv_append_varr(&pppd_args, tunnel->config->pppd_log)) return 1; } else { - /* pppd defaults to logging to fd=1, clobbering the - * actual PPP data */ + /* + * pppd defaults to logging to fd=1, clobbering the + * actual PPP data + */ if (ofv_append_varr(&pppd_args, "logfd")) return 1; if (ofv_append_varr(&pppd_args, "2"))