Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/blacklist Whitespace police.



details:   https://anonhg.NetBSD.org/src/rev/881c663f95fd
branches:  trunk
changeset: 970056:881c663f95fd
user:      roy <roy%NetBSD.org@localhost>
date:      Tue Mar 10 13:36:07 2020 +0000

description:
Whitespace police.

diffstat:

 external/bsd/blacklist/bin/blacklistd.c |  21 +++++++++----------
 external/bsd/blacklist/bin/conf.c       |  34 ++++++++++++++++----------------
 external/bsd/blacklist/bin/run.c        |   6 ++--
 external/bsd/blacklist/bin/support.c    |   6 ++--
 external/bsd/blacklist/lib/bl.c         |   7 ++---
 5 files changed, 36 insertions(+), 38 deletions(-)

diffs (truncated from 328 to 300 lines):

diff -r 360d631d7357 -r 881c663f95fd external/bsd/blacklist/bin/blacklistd.c
--- a/external/bsd/blacklist/bin/blacklistd.c   Tue Mar 10 11:07:39 2020 +0000
+++ b/external/bsd/blacklist/bin/blacklistd.c   Tue Mar 10 13:36:07 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: blacklistd.c,v 1.39 2019/11/06 20:50:01 christos Exp $ */
+/*     $NetBSD: blacklistd.c,v 1.40 2020/03/10 13:36:07 roy Exp $      */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "config.h"
 #endif
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: blacklistd.c,v 1.39 2019/11/06 20:50:01 christos Exp $");
+__RCSID("$NetBSD: blacklistd.c,v 1.40 2020/03/10 13:36:07 roy Exp $");
 
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -123,7 +123,7 @@
                return 0;
 
        if (errno != ENOTCONN) {
-               (*lfun)(LOG_ERR, "getpeername failed (%m)"); 
+               (*lfun)(LOG_ERR, "getpeername failed (%m)");
                return -1;
        }
 
@@ -141,13 +141,13 @@
                break;
        default:
                (*lfun)(LOG_ERR, "bad client passed socket family %u",
-                   (unsigned)bi->bi_ss.ss_family); 
+                   (unsigned)bi->bi_ss.ss_family);
                return -1;
        }
 
        if (*rsl != bi->bi_slen) {
                (*lfun)(LOG_ERR, "bad client passed socket length %u != %u",
-                   (unsigned)*rsl, (unsigned)bi->bi_slen); 
+                   (unsigned)*rsl, (unsigned)bi->bi_slen);
                return -1;
        }
 
@@ -157,7 +157,7 @@
        if (*rsl != rss->ss_len) {
                (*lfun)(LOG_ERR,
                    "bad client passed socket internal length %u != %u",
-                   (unsigned)*rsl, (unsigned)rss->ss_len); 
+                   (unsigned)*rsl, (unsigned)rss->ss_len);
                return -1;
        }
 #endif
@@ -176,12 +176,12 @@
        struct timespec ts;
 
        if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
-               (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); 
+               (*lfun)(LOG_ERR, "clock_gettime failed (%m)");
                return;
        }
 
        if ((bi = bl_recv(bl)) == NULL) {
-               (*lfun)(LOG_ERR, "no message (%m)"); 
+               (*lfun)(LOG_ERR, "no message (%m)");
                return;
        }
 
@@ -251,7 +251,6 @@
                        (*lfun)(LOG_INFO,
                            "blocked %s/%d:%d for %d seconds",
                            rbuf, c.c_lmask, c.c_port, c.c_duration);
-                               
                }
                break;
        case BL_DELETE:
@@ -264,7 +263,7 @@
                /* ignore for now */
                break;
        default:
-               (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); 
+               (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type);
        }
        state_put(state, &c, &dbi);
 
@@ -306,7 +305,7 @@
        void *ss = &c.c_ss;
 
        if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
-               (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); 
+               (*lfun)(LOG_ERR, "clock_gettime failed (%m)");
                return;
        }
 
diff -r 360d631d7357 -r 881c663f95fd external/bsd/blacklist/bin/conf.c
--- a/external/bsd/blacklist/bin/conf.c Tue Mar 10 11:07:39 2020 +0000
+++ b/external/bsd/blacklist/bin/conf.c Tue Mar 10 13:36:07 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.c,v 1.25 2019/11/06 21:01:17 christos Exp $       */
+/*     $NetBSD: conf.c,v 1.26 2020/03/10 13:36:07 roy Exp $    */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: conf.c,v 1.25 2019/11/06 21:01:17 christos Exp $");
+__RCSID("$NetBSD: conf.c,v 1.26 2020/03/10 13:36:07 roy Exp $");
 
 #include <stdio.h>
 #ifdef HAVE_LIBUTIL_H
@@ -173,9 +173,9 @@
                        }
                        break;
                }
-       } else  
+       } else
                tot = im;
-                       
+
        if (e == 0) {
                c->c_duration = (int)tot;
                return 0;
@@ -214,7 +214,7 @@
 getmask(const char *f, size_t l, bool local, const char **p, int *mask)
 {
        char *d;
-       const char *s = *p; 
+       const char *s = *p;
 
        if ((d = strchr(s, ':')) != NULL) {
                *d++ = '\0';
@@ -264,7 +264,7 @@
                        sin6->sin6_len = sizeof(*sin6);
 #endif
                        port = &sin6->sin6_port;
-               } 
+               }
        } else if (pstr != p || strchr(p, '.') || conf_is_interface(p)) {
                if (pstr == p)
                        pstr = "*";
@@ -366,11 +366,12 @@
 {
        if (getmask(f, l, local, &p, &c->c_rmask) == -1)
                return -1;
-               
+
        if (strcmp(p, "*") == 0) {
                strlcpy(c->c_name, rulename, CONFNAMESZ);
                return 0;
        }
+
        if (strcmp(p, "=") == 0) {
                if (local)
                        goto out;
@@ -473,7 +474,6 @@
                        return 1;
                goto out;
        case FEQUAL:
-               
                (*lfun)(LOG_CRIT, "%s: Internal error: bad mask %d", __func__,
                    mask);
                abort();
@@ -687,7 +687,7 @@
 static int
 conf_eq(const struct conf *c1, const struct conf *c2)
 {
-               
+
        if (!conf_addr_eq(&c1->c_ss, &c2->c_ss, c2->c_lmask))
                return 0;
 
@@ -744,7 +744,7 @@
        if (port == FSTAR)
                return;
 
-       if (b[0] == '\0' || strcmp(b, "*") == 0) 
+       if (b[0] == '\0' || strcmp(b, "*") == 0)
                snprintf(b, l, "%d", port);
        else {
                snprintf(buf, sizeof(buf), ":%d", port);
@@ -820,7 +820,7 @@
 
        fmtmask(ha, sizeof(ha), c->c_family, c->c_lmask);
        fmtport(ha, sizeof(ha), c->c_port);
-       
+
        sp = *delim == '\t' ? 20 : -1;
        hb[0] = '\0';
        if (*delim)
@@ -878,7 +878,7 @@
                (*lfun)(LOG_DEBUG, "%s: %s", __func__,
                    conf_print(buf, sizeof(buf), "to:\t", "", c));
        }
-       
+
        if (sc->c_name[0])
                memcpy(c->c_name, sc->c_name, CONFNAMESZ);
        if (sc->c_uid != FEQUAL)
@@ -1012,13 +1012,13 @@
        slen = sizeof(lss);
        memset(&lss, 0, slen);
        if (getsockname(fd, (void *)&lss, &slen) == -1) {
-               (*lfun)(LOG_ERR, "getsockname failed (%m)"); 
+               (*lfun)(LOG_ERR, "getsockname failed (%m)");
                return NULL;
        }
 
        slen = sizeof(proto);
        if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &proto, &slen) == -1) {
-               (*lfun)(LOG_ERR, "getsockopt failed (%m)"); 
+               (*lfun)(LOG_ERR, "getsockopt failed (%m)");
                return NULL;
        }
 
@@ -1035,7 +1035,7 @@
                cr->c_proto = IPPROTO_UDP;
                break;
        default:
-               (*lfun)(LOG_ERR, "unsupported protocol %d", proto); 
+               (*lfun)(LOG_ERR, "unsupported protocol %d", proto);
                return NULL;
        }
 
@@ -1047,7 +1047,7 @@
                cr->c_port = ntohs(((struct sockaddr_in6 *)&lss)->sin6_port);
                break;
        default:
-               (*lfun)(LOG_ERR, "unsupported family %d", lss.ss_family); 
+               (*lfun)(LOG_ERR, "unsupported family %d", lss.ss_family);
                return NULL;
        }
 
@@ -1132,7 +1132,7 @@
        fclose(fp);
        confset_sort(&lc);
        confset_sort(&rc);
-       
+
        confset_replace(&rconf, &rc);
        confset_replace(&lconf, &lc);
 
diff -r 360d631d7357 -r 881c663f95fd external/bsd/blacklist/bin/run.c
--- a/external/bsd/blacklist/bin/run.c  Tue Mar 10 11:07:39 2020 +0000
+++ b/external/bsd/blacklist/bin/run.c  Tue Mar 10 13:36:07 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: run.c,v 1.14 2016/04/04 15:52:56 christos Exp $        */
+/*     $NetBSD: run.c,v 1.15 2020/03/10 13:36:07 roy Exp $     */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: run.c,v 1.14 2016/04/04 15:52:56 christos Exp $");
+__RCSID("$NetBSD: run.c,v 1.15 2020/03/10 13:36:07 roy Exp $");
 
 #include <stdio.h>
 #ifdef HAVE_LIBUTIL_H
@@ -75,7 +75,7 @@
            (argv[i] = va_arg(ap, char *)) != NULL; i++)
                continue;
        va_end(ap);
-               
+
        if (debug) {
                size_t z;
                int r;
diff -r 360d631d7357 -r 881c663f95fd external/bsd/blacklist/bin/support.c
--- a/external/bsd/blacklist/bin/support.c      Tue Mar 10 11:07:39 2020 +0000
+++ b/external/bsd/blacklist/bin/support.c      Tue Mar 10 13:36:07 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: support.c,v 1.9 2018/09/18 22:12:19 christos Exp $     */
+/*     $NetBSD: support.c,v 1.10 2020/03/10 13:36:07 roy Exp $ */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: support.c,v 1.9 2018/09/18 22:12:19 christos Exp $");
+__RCSID("$NetBSD: support.c,v 1.10 2020/03/10 13:36:07 roy Exp $");
 
 #include <time.h>
 #include <string.h>
@@ -46,7 +46,7 @@
 #include "support.h"
 
 static __attribute__((__format_arg__(3))) const char *
-expandm(char *buf, size_t len, const char *fmt) 
+expandm(char *buf, size_t len, const char *fmt)
 {
        char *p;
        size_t r;
diff -r 360d631d7357 -r 881c663f95fd external/bsd/blacklist/lib/bl.c
--- a/external/bsd/blacklist/lib/bl.c   Tue Mar 10 11:07:39 2020 +0000
+++ b/external/bsd/blacklist/lib/bl.c   Tue Mar 10 13:36:07 2020 +0000
@@ -1,4 +1,4 @@



Home | Main Index | Thread Index | Old Index