From: reyk Date: Sat, 2 Aug 2014 09:54:13 +0000 (+0000) Subject: spacing X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5803884eb2cb3c11213dd80617c3c8f90b2f9591;p=openbsd spacing --- diff --git a/usr.sbin/httpd/httpd.c b/usr.sbin/httpd/httpd.c index 884d6d7569f..e201b404e8e 100644 --- a/usr.sbin/httpd/httpd.c +++ b/usr.sbin/httpd/httpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: httpd.c,v 1.11 2014/08/01 21:59:56 reyk Exp $ */ +/* $OpenBSD: httpd.c,v 1.12 2014/08/02 09:54:13 reyk Exp $ */ /* * Copyright (c) 2014 Reyk Floeter @@ -490,7 +490,7 @@ canonicalize_path(const char *input, char *path, size_t len) while (i[1] == '/') i++; continue; - } else if (i[1] == '.' && i[2] == '.' && + } else if (i[1] == '.' && i[2] == '.' && (i[3] == '/' || i[3] == '\0')) { /* b) revert '..' to previous directory */ i += 3; diff --git a/usr.sbin/httpd/server_fcgi.c b/usr.sbin/httpd/server_fcgi.c index 0a08c4b6562..618d159734f 100644 --- a/usr.sbin/httpd/server_fcgi.c +++ b/usr.sbin/httpd/server_fcgi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_fcgi.c,v 1.7 2014/08/01 18:26:32 florian Exp $ */ +/* $OpenBSD: server_fcgi.c,v 1.8 2014/08/02 09:54:13 reyk Exp $ */ /* * Copyright (c) 2014 Florian Obser @@ -89,17 +89,17 @@ int fcgi_add_param(uint8_t *, const char *, const char *, int *, int server_fcgi(struct httpd *env, struct client *clt) { + uint8_t buf[FCGI_RECORD_SIZE]; + char hbuf[MAXHOSTNAMELEN]; struct server_config *srv_conf = clt->clt_srv_conf; struct http_descriptor *desc = clt->clt_desc; struct sockaddr_un sun; - struct fcgi_record_header *h; + struct fcgi_record_header *h; struct fcgi_begin_request_body *begin; struct kv *kv, key; size_t len; int fd, total_len; const char *errstr = NULL; - uint8_t buf[FCGI_RECORD_SIZE]; - char hbuf[MAXHOSTNAMELEN]; char *request_uri; if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) @@ -406,10 +406,10 @@ fcgi_add_param(uint8_t *buf, const char *key, const char *val, int *total_len, void server_fcgi_read(struct bufferevent *bev, void *arg) { - struct client *clt = (struct client *) arg; - struct fcgi_record_header *h; - uint8_t buf[FCGI_RECORD_SIZE]; - size_t len; + uint8_t buf[FCGI_RECORD_SIZE]; + struct client *clt = (struct client *) arg; + struct fcgi_record_header *h; + size_t len; len = bufferevent_read(bev, &buf, clt->clt_fcgi_toread); /* XXX error handling */ diff --git a/usr.sbin/httpd/server_file.c b/usr.sbin/httpd/server_file.c index f6fffd0e886..5985681acdd 100644 --- a/usr.sbin/httpd/server_file.c +++ b/usr.sbin/httpd/server_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_file.c,v 1.23 2014/08/02 09:46:51 reyk Exp $ */ +/* $OpenBSD: server_file.c,v 1.24 2014/08/02 09:54:13 reyk Exp $ */ /* * Copyright (c) 2006 - 2014 Reyk Floeter @@ -270,7 +270,7 @@ server_file_index(struct httpd *env, struct client *clt) } t = st.st_mtime; - localtime_r(&t, &tm); + localtime_r(&t, &tm); strftime(tmstr, sizeof(tmstr), "%d-%h-%Y %R", &tm); namewidth = 51 - strlen(dp->d_name);