Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/httpd - add FALLTHROUGH comment



details:   https://anonhg.NetBSD.org/src/rev/5b4fe68751cc
branches:  trunk
changeset: 446116:5b4fe68751cc
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Nov 24 13:08:10 2018 +0000

description:
- add FALLTHROUGH comment
- one return is usually enough.

diffstat:

 libexec/httpd/bozohttpd.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 604a70ff9b2d -r 5b4fe68751cc libexec/httpd/bozohttpd.c
--- a/libexec/httpd/bozohttpd.c Sat Nov 24 13:03:15 2018 +0000
+++ b/libexec/httpd/bozohttpd.c Sat Nov 24 13:08:10 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bozohttpd.c,v 1.96 2018/11/24 02:35:13 mrg Exp $       */
+/*     $NetBSD: bozohttpd.c,v 1.97 2018/11/24 13:08:10 christos Exp $  */
 
 /*     $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $      */
 
@@ -1018,6 +1018,7 @@
                case '"':
                        if (absolute)
                                goto leave_it;
+                       /*FALLTHROUGH*/
                case '\n':
                case '\r':
                case ' ':
@@ -1026,8 +1027,8 @@
                        d += 3;
                        len += 3;
                        break;
+               default:
                leave_it:
-               default:
                        *d++ = *s++;
                        len++;
                        break;
@@ -1477,7 +1478,6 @@
                             REDIRECT_FILE) >= sizeof(redir)) {
                return bozo_http_error(httpd, 404, request,
                    "redirectfile path too long");
-               return -1;
        }
        if (lstat(redir, &sb) == 0) {
                if (!S_ISLNK(sb.st_mode))



Home | Main Index | Thread Index | Old Index