Commit dd74a963 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

OCD patch: return (x)

parent f72bf057
......@@ -412,7 +412,7 @@ vdi_get_backend_if_simple(const struct director *d)
vs2 = d->priv;
if (vs2->magic != VDI_SIMPLE_MAGIC)
return NULL;
return (NULL);
CAST_OBJ_NOTNULL(vs, d->priv, VDI_SIMPLE_MAGIC);
return (vs->backend);
}
......
......@@ -342,7 +342,7 @@ VRT_time_string(const struct sess *sp, double t)
AN(p = WS_Alloc(sp->http->ws, VTIM_FORMAT_SIZE));
VTIM_format(t, p);
return p;
return (p);
}
const char *
......
......@@ -485,9 +485,9 @@ VRT_r_server_identity(struct sess *sp)
(void)sp;
if (heritage.identity[0] != '\0')
return heritage.identity;
return (heritage.identity);
else
return heritage.name;
return (heritage.name);
}
......
......@@ -57,7 +57,7 @@ static unsigned char hcb_bittbl[256];
static unsigned char
hcb_bits(unsigned char x, unsigned char y)
{
return hcb_bittbl[x ^ y];
return (hcb_bittbl[x ^ y]);
}
static void
......
......@@ -200,7 +200,7 @@ vwe_thread(void *priv)
SES_Delete(sp, "timeout");
}
}
return NULL;
return (NULL);
}
/*--------------------------------------------------------------------*/
......@@ -219,7 +219,7 @@ vwe_sess_timeout_ticker(void *priv)
assert(write(vwe->timer_pipes[1], &ticker, 1));
VTIM_sleep(100 * 1e-3);
}
return NULL;
return (NULL);
}
/*--------------------------------------------------------------------*/
......
......@@ -200,11 +200,11 @@ req_header(struct logline *l, const char *name)
struct hdr *h;
VTAILQ_FOREACH(h, &l->req_headers, list) {
if (strcasecmp(h->key, name) == 0) {
return h->value;
return (h->value);
break;
}
}
return NULL;
return (NULL);
}
static char *
......@@ -213,11 +213,11 @@ resp_header(struct logline *l, const char *name)
struct hdr *h;
VTAILQ_FOREACH(h, &l->resp_headers, list) {
if (strcasecmp(h->key, name) == 0) {
return h->value;
return (h->value);
break;
}
}
return NULL;
return (NULL);
}
static char *
......@@ -226,11 +226,11 @@ vcl_log(struct logline *l, const char *name)
struct hdr *h;
VTAILQ_FOREACH(h, &l->vcl_log, list) {
if (strcasecmp(h->key, name) == 0) {
return h->value;
return (h->value);
break;
}
}
return NULL;
return (NULL);
}
static void
......
......@@ -61,11 +61,11 @@ VTCP_port(const struct sockaddr_storage *addr)
if (addr->ss_family == AF_INET) {
const struct sockaddr_in *ain = (const void *)addr;
return ntohs((ain->sin_port));
return (ntohs((ain->sin_port)));
}
if (addr->ss_family == AF_INET6) {
const struct sockaddr_in6 *ain = (const void *)addr;
return ntohs((ain->sin6_port));
return (ntohs((ain->sin6_port)));
}
return (-1);
}
......
......@@ -64,6 +64,6 @@ int main(int argc, char **argv)
#include "tbl/vsc_fields.h"
#undef VSC_DO_VBE
return 0;
return (0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment