This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Undernet IRC Server Source Code.".

The branch, u2_10_12_branch has been updated
       via  48c15bd1cf3a9a2057924a0a1e4a0aca4db4a6c4 (commit)
       via  dbd8ad54ebd448187cc18b099033d649510d54bb (commit)
       via  057de940d36d9a1987d89e780876deaffa44bd3a (commit)
      from  d0f081b96dc815e53b52b9820d09e1472225610e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 48c15bd1cf3a9a2057924a0a1e4a0aca4db4a6c4
Author: Michael Poole <[email protected]>
Date:   Tue Jul 17 22:49:51 2018 -0400

    s_bsd: Fix loop and comparison of dolen.

diff --git a/ircd/s_bsd.c b/ircd/s_bsd.c
index 2e018716..0a92c7cf 100644
--- a/ircd/s_bsd.c
+++ b/ircd/s_bsd.c
@@ -663,12 +663,10 @@ static int read_packet(struct Client *cptr, int 
socket_ready)
        */
       if (IsHandshake(cptr) || IsServer(cptr))
       {
-        while (-1)
+        while (1)
         {
           dolen = dbuf_get(&(cli_recvQ(cptr)), readbuf, sizeof(readbuf));
-          if (dolen <= 0)
-            return 1;
-          else if (dolen == 0)
+          if (dolen == 0)
           {
             if (DBufLength(&(cli_recvQ(cptr))) < 510)
               SetFlag(cptr, FLAG_NONL);
commit dbd8ad54ebd448187cc18b099033d649510d54bb
Author: Michael Poole <[email protected]>
Date:   Tue Jul 17 22:49:27 2018 -0400

    ircd_snprintf: Fix comparison of short vs size_t.

diff --git a/ircd/ircd_snprintf.c b/ircd/ircd_snprintf.c
index eaec2cdd..282fdc7c 100644
--- a/ircd/ircd_snprintf.c
+++ b/ircd/ircd_snprintf.c
@@ -2000,7 +2000,7 @@ doprintf(struct Client *dest, struct BufData *buf_p, 
const char *fmt,
 
       doprintf(dest, &buf_s, vdata->vd_format, vdata->vd_args);
 
-      plen = (fld_s.width - buf_s.buf_loc <= 0 ? 0 :
+      plen = (fld_s.width <= buf_s.buf_loc ? 0 :
              fld_s.width - buf_s.buf_loc);
 
       if (plen > 0) {
commit 057de940d36d9a1987d89e780876deaffa44bd3a
Author: Michael Poole <[email protected]>
Date:   Tue Jul 17 22:49:00 2018 -0400

    Fix minor inconsistencies and typos.

diff --git a/ircd/ircd_res.c b/ircd/ircd_res.c
index 627e12e8..3a299c6a 100644
--- a/ircd/ircd_res.c
+++ b/ircd/ircd_res.c
@@ -144,7 +144,7 @@ static void timeout_resolver(struct Event *notused);
 
 extern struct irc_sockaddr irc_nsaddr_list[IRCD_MAXNS];
 extern int irc_nscount;
-extern char irc_domain[HOSTLEN];
+extern char irc_domain[HOSTLEN + 1];
 
 /** Prepare the resolver library to (optionally) accept a list of
  * DNS servers through add_dns_server().
diff --git a/ircd/ircd_reslib.c b/ircd/ircd_reslib.c
index b6372732..1a647f8b 100644
--- a/ircd/ircd_reslib.c
+++ b/ircd/ircd_reslib.c
@@ -141,7 +141,7 @@ static int irc_ns_name_compress(const char *src, unsigned 
char *dst, size_t dsts
     const unsigned char **dnptrs, const unsigned char **lastdnptr);
 static int irc_dn_find(const unsigned char *, const unsigned char *, const 
unsigned char * const *,
                        const unsigned char * const *);
-static int irc_encode_bitsring(const char **, const char *, unsigned char **, 
unsigned char **,
+static int irc_encode_bitstring(const char **, const char *, unsigned char **, 
unsigned char **,
                                const char *);
 static int mklower(int ch);
 
@@ -728,7 +728,7 @@ irc_ns_name_pton(const char *src, unsigned char *dst, 
size_t dstsiz)
           errno = EINVAL; /* ??? */
           return(-1);
         }
-        if ((e = irc_encode_bitsring(&src,
+        if ((e = irc_encode_bitstring(&src,
                cp + 2,
                &label,
                &bp,
@@ -964,18 +964,16 @@ irc_ns_name_compress(const char *src, unsigned char *dst, 
size_t dstsiz,
  * @param[out] eom End of output buffer.
  */
 static int
-irc_encode_bitsring(const char **bp, const char *end, unsigned char **labelp,
+irc_encode_bitstring(const char **bp, const char *end, unsigned char **labelp,
                     unsigned char **dst, const char *eom)
 {
   int afterslash = 0;
   const char *cp = *bp;
   char *tp, c;
-  const char *beg_blen;
+  const char *beg_blen = NULL;
   char *end_blen = NULL;
   int value = 0, count = 0, tbcount = 0, blen = 0;
 
-  beg_blen = end_blen = NULL;
-
   /* a bitstring must contain at least 2 characters */
   if (end - cp < 2)
     return(EINVAL);
diff --git a/ircd/listener.c b/ircd/listener.c
index d5b00b34..99fbaa66 100644
--- a/ircd/listener.c
+++ b/ircd/listener.c
@@ -475,11 +475,10 @@ static void accept_connection(struct Event* ev)
     {
       if ((fd = os_accept(s_fd(ev_socket(ev)), &addr)) == -1)
       {
-        if (errno == EAGAIN ||
+        if (errno == EAGAIN) return;
 #ifdef EWOULDBLOCK
-            errno == EWOULDBLOCK)
+       if (errno == EWOULDBLOCK) return;
 #endif
-          return;
       /* Lotsa admins seem to have problems with not giving enough file
        * descriptors to their server so we'll add a generic warning mechanism
        * here.  If it turns out too many messages are generated for
diff --git a/ircd/m_connect.c b/ircd/m_connect.c
index ca4856d9..c31c20bc 100644
--- a/ircd/m_connect.c
+++ b/ircd/m_connect.c
@@ -188,8 +188,6 @@ int ms_connect(struct Client* cptr, struct Client* sptr, 
int parc, char* parv[])
   tmpport = aconf->address.port;
   if (port)
     aconf->address.port = port;
-  else
-    port = aconf->address.port;
 
   /*
    * Notify all operators about remote connect requests
diff --git a/ircd/m_gline.c b/ircd/m_gline.c
index 9b6f6616..355ce4a2 100644
--- a/ircd/m_gline.c
+++ b/ircd/m_gline.c
@@ -230,9 +230,9 @@ ms_gline(struct Client *cptr, struct Client *sptr, int 
parc, char *parv[])
 
        /* OK, create the local G-line */
        Debug((DEBUG_DEBUG, "I am creating a local G-line here; target %s, "
-              "mask %s, operforce %s, action %s, expire %Tu, reason: %s",
+              "mask %s, operforce %s, expire %Tu, reason: %s",
               target, mask, flags & GLINE_OPERFORCE ? "YES" : "NO",
-              action == GLINE_ACTIVATE ? "+" : "-", expire, reason));
+              expire, reason));
 
        return gline_add(cptr, sptr, mask, reason, expire, lastmod,
                         lifetime, flags | GLINE_ACTIVE);
@@ -243,9 +243,8 @@ ms_gline(struct Client *cptr, struct Client *sptr, int 
parc, char *parv[])
 
       /* Let's now destroy the G-line */;
       Debug((DEBUG_DEBUG, "I am destroying a local G-line here; target %s, "
-            "mask %s, operforce %s, action %s", target, mask,
-            flags & GLINE_OPERFORCE ? "YES" : "NO",
-            action == GLINE_ACTIVATE ? "+" : "-"));
+            "mask %s, operforce %s", target, mask,
+            flags & GLINE_OPERFORCE ? "YES" : "NO"));
 
       return gline_destroy(cptr, sptr, agline);
     }
@@ -578,9 +577,9 @@ mo_gline(struct Client *cptr, struct Client *sptr, int 
parc, char *parv[])
 
       /* OK, create the local G-line */
       Debug((DEBUG_DEBUG, "I am creating a local G-line here; target %s, "
-            "mask %s, operforce %s, action  %s, expire %Tu, reason: %s",
+            "mask %s, operforce %s, expire %Tu, reason: %s",
             target, mask, flags & GLINE_OPERFORCE ? "YES" : "NO",
-            action == GLINE_ACTIVATE ? "+" : "-", expire, reason));
+            expire, reason));
 
       return gline_add(cptr, sptr, mask, reason, expire, 0, 0,
                       flags | GLINE_ACTIVE);
@@ -590,9 +589,8 @@ mo_gline(struct Client *cptr, struct Client *sptr, int 
parc, char *parv[])
 
       /* Let's now destroy the G-line */
       Debug((DEBUG_DEBUG, "I am destroying a local G-line here; target %s, "
-            "mask %s, operforce %s, action %s", target, mask,
-            flags & GLINE_OPERFORCE ? "YES" : "NO",
-            action == GLINE_ACTIVATE ? "+" : "-"));
+            "mask %s, operforce %s", target, mask,
+            flags & GLINE_OPERFORCE ? "YES" : "NO"));
 
       return gline_destroy(cptr, sptr, agline);
     }
diff --git a/ircd/m_notice.c b/ircd/m_notice.c
index 6f2d295f..f253535e 100644
--- a/ircd/m_notice.c
+++ b/ircd/m_notice.c
@@ -82,6 +82,7 @@
 #include "config.h"
 
 #include "client.h"
+#include "handlers.h"
 #include "ircd_chattr.h"
 #include "ircd_log.h"
 #include "ircd_relay.h"
diff --git a/ircd/m_server.c b/ircd/m_server.c
index 08ee483e..491328d0 100644
--- a/ircd/m_server.c
+++ b/ircd/m_server.c
@@ -685,7 +685,6 @@ int ms_server(struct Client* cptr, struct Client* sptr, int 
parc, char* parv[])
   if (parc < 8)
   {
     return need_more_params(sptr, "SERVER");
-    return exit_client(cptr, cptr, &me, "Need more parameters");
   }
   host = clean_servername(parv[1]);
   if (!host)
diff --git a/ircd/msgq.c b/ircd/msgq.c
index 379ffae6..a5d11ec9 100644
--- a/ircd/msgq.c
+++ b/ircd/msgq.c
@@ -194,7 +194,7 @@ msgq_mapiov(const struct MsgQ *mq, struct iovec *iov, int 
count,
   assert(0 != count);
   assert(0 != len);
 
-  if (mq->length <= 0) /* no data to map */
+  if (mq->length < 1) /* no data to map */
     return 0;
 
   if (mq->queue.head && mq->queue.head->sent > 0) { /* partial msg on norm q */
diff --git a/ircd/numnicks.c b/ircd/numnicks.c
index e7e54c5c..01dc2ee7 100644
--- a/ircd/numnicks.c
+++ b/ircd/numnicks.c
@@ -279,7 +279,7 @@ void SetYXXCapacity(struct Client* c, unsigned int capacity)
    * Sanity checks
    */
   if (max_clients > NN_MAX_CLIENT) {
-    fprintf(stderr, "MAXCLIENTS (or MAXCONNECTIONS) is (at least) %d "
+    fprintf(stderr, "MAXCLIENTS (or MAXCONNECTIONS) is (at least) %u "
             "too large ! Please decrease this value.\n",
              max_clients - NN_MAX_CLIENT);
     exit(-1);
diff --git a/ircd/os_generic.c b/ircd/os_generic.c
index cd38d400..b84c7a09 100644
--- a/ircd/os_generic.c
+++ b/ircd/os_generic.c
@@ -252,8 +252,7 @@ int os_get_rusage(struct Client *cptr, int uptime, EnumFn 
enumerator)
           rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw);
   (*enumerator)(cptr, buf);
 
-#else /* HAVE_GETRUSAGE */
-#if HAVE_TIMES
+#elif HAVE_TIMES
   char buf[256];
   struct tms tmsbuf;
   time_t secs, mins;
@@ -281,8 +280,7 @@ int os_get_rusage(struct Client *cptr, int uptime, EnumFn 
enumerator)
   sprintf(buf, "CPU Secs %d:%d User %d:%d System %d:%d", 
           mins, secs, umin, usec, smin, ssec);
   (*enumerator)(cptr, buf);
-#endif /* HAVE_TIMES */
-#endif /* HAVE_GETRUSAGE */
+#endif /* HAVE_GETRUSAGE, elif HAVE_TIMES */
   return 1;
 }
 #endif
diff --git a/ircd/s_auth.c b/ircd/s_auth.c
index fe745f55..cf66b950 100644
--- a/ircd/s_auth.c
+++ b/ircd/s_auth.c
@@ -2346,7 +2346,8 @@ static void iauth_read(struct IAuth *iauth)
                                 sizeof(readbuf) - length - 1,
                                 &count))
     return;
-  readbuf[length += count] = '\0';
+  length += count;
+  readbuf[length] = '\0';
 
   /* Parse each complete line. */
   for (sol = readbuf; (eol = strchr(sol, '\n')) != NULL; sol = eol + 1) {
@@ -2423,7 +2424,8 @@ static void iauth_read_stderr(struct IAuth *iauth)
                                  sizeof(readbuf) - length - 1,
                                  &count))
     return;
-  readbuf[length += count] = '\0';
+  length += count;
+  readbuf[length] = '\0';
 
   /* Send each complete line to SNO_AUTH. */
   for (sol = readbuf; (eol = strchr(sol, '\n')) != NULL; sol = eol + 1) {
diff --git a/ircd/s_debug.c b/ircd/s_debug.c
index 06fd27a7..18a327ea 100644
--- a/ircd/s_debug.c
+++ b/ircd/s_debug.c
@@ -388,7 +388,7 @@ void count_memory(struct Client *cptr, const struct 
StatDesc *sd,
 #endif
 
   send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
-            ":Total: ww %zu ch %zu cl %zu co %zu db %zu ms %zu mb %zu",
-            totww, totch, totcl, com, dbufs_allocated, msg_allocated,
+            ":Total: tot %zu ww %zu ch %zu cl %zu co %zu db %zu ms %zu mb %zu",
+            tot, totww, totch, totcl, com, dbufs_allocated, msg_allocated,
             msgbuf_allocated);
 }
-----------------------------------------------------------------------

Summary of changes:
 ircd/ircd_res.c      |  2 +-
 ircd/ircd_reslib.c   | 10 ++++------
 ircd/ircd_snprintf.c |  2 +-
 ircd/listener.c      |  5 ++---
 ircd/m_connect.c     |  2 --
 ircd/m_gline.c       | 18 ++++++++----------
 ircd/m_notice.c      |  1 +
 ircd/m_server.c      |  1 -
 ircd/msgq.c          |  2 +-
 ircd/numnicks.c      |  2 +-
 ircd/os_generic.c    |  6 ++----
 ircd/s_auth.c        |  6 ++++--
 ircd/s_bsd.c         |  6 ++----
 ircd/s_debug.c       |  4 ++--
 14 files changed, 29 insertions(+), 38 deletions(-)


hooks/post-receive
-- 
Undernet IRC Server Source Code.
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to