pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/chat/dircproxy-devel Don't use ternary operator as lva...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dd70072665e0
branches:  trunk
changeset: 515311:dd70072665e0
user:      tron <tron%pkgsrc.org@localhost>
date:      Fri Jun 30 15:53:18 2006 +0000

description:
Don't use ternary operator as lvalue in an assignment because GCC 4.x
doesn't tolerate such questionable programming pratice.

diffstat:

 chat/dircproxy-devel/distinfo         |   6 ++++--
 chat/dircproxy-devel/patches/patch-ac |  24 +++++++++++++++++++++---
 chat/dircproxy-devel/patches/patch-ae |  13 +++++++++++++
 chat/dircproxy-devel/patches/patch-af |  13 +++++++++++++
 4 files changed, 51 insertions(+), 5 deletions(-)

diffs (91 lines):

diff -r 743154871d9c -r dd70072665e0 chat/dircproxy-devel/distinfo
--- a/chat/dircproxy-devel/distinfo     Fri Jun 30 15:38:53 2006 +0000
+++ b/chat/dircproxy-devel/distinfo     Fri Jun 30 15:53:18 2006 +0000
@@ -1,9 +1,11 @@
-$NetBSD: distinfo,v 1.5 2006/04/28 13:23:25 tron Exp $
+$NetBSD: distinfo,v 1.6 2006/06/30 15:53:18 tron Exp $
 
 SHA1 (dircproxy-1.2.0-beta.tar.bz) = d0979ad3711184fa581fe413c9e3ea156660ac56
 RMD160 (dircproxy-1.2.0-beta.tar.bz) = 08016210b245872f7c071e25d067f7ef1e97f17d
 Size (dircproxy-1.2.0-beta.tar.bz) = 312912 bytes
 SHA1 (patch-aa) = 59870074b86f1150f904e10269c654719b506f29
 SHA1 (patch-ab) = c0e8706c0f1bb7a2c981d1140d1b1deb105c601b
-SHA1 (patch-ac) = c07df4e100c82e935c48b722da702e562def135b
+SHA1 (patch-ac) = a34ee53efb8d91b05e480fe1c8791c31fd5d8130
 SHA1 (patch-ad) = 818d7f0ca0590f40dc2e46926236ba033cadbf0d
+SHA1 (patch-ae) = 41dc5f60038e3dad23ac5a2ae68d3205b3f24e28
+SHA1 (patch-af) = d856fcac0fcbfa2eec986c1bfd9ba780f90712a4
diff -r 743154871d9c -r dd70072665e0 chat/dircproxy-devel/patches/patch-ac
--- a/chat/dircproxy-devel/patches/patch-ac     Fri Jun 30 15:38:53 2006 +0000
+++ b/chat/dircproxy-devel/patches/patch-ac     Fri Jun 30 15:53:18 2006 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ac,v 1.3 2006/04/27 16:36:17 tron Exp $
+$NetBSD: patch-ac,v 1.4 2006/06/30 15:53:18 tron Exp $
 
 --- src/irc_server.c.orig      2006-02-18 22:39:32.000000000 +0000
-+++ src/irc_server.c   2006-04-27 17:18:02.000000000 +0100
++++ src/irc_server.c   2006-06-30 16:44:53.000000000 +0100
 @@ -587,9 +587,10 @@
          ;
          if (strcmp(ss->str,s->str))  // this line is not already present
@@ -19,7 +19,25 @@
  
                /* Was in the squelch list, so remove it and stop looking */
 -              s = (l ? l->next : p->squelch_modes) = n;
-+            s = *(l ? &(l->next) : &(p->squelch_modes)) = n;
++              s = *(l ? &l->next : &p->squelch_modes) = n;
                squelch = 1;
                break;
              } else {
+@@ -817,7 +818,7 @@
+         if (p->squelch_modes) {
+           struct strlist *s, *l;
+ 
+-          l = 0;
++          l = NULL;
+           s = p->squelch_modes;
+ 
+           while (s) {
+@@ -829,7 +830,7 @@
+               free(s);
+ 
+               /* Was in the squelch list, so remove it and stop looking */
+-              s = (l ? l->next : p->squelch_modes) = n;
++              s = *(l ? &l->next : &p->squelch_modes) = n;
+               squelch = 1;
+               break;
+             } else {
diff -r 743154871d9c -r dd70072665e0 chat/dircproxy-devel/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/dircproxy-devel/patches/patch-ae     Fri Jun 30 15:53:18 2006 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1 2006/06/30 15:53:18 tron Exp $
+
+--- src/dcc_net.c.orig 2006-02-18 22:39:32.000000000 +0000
++++ src/dcc_net.c      2006-06-30 16:49:06.000000000 +0100
+@@ -368,7 +368,7 @@
+       n = p->next;
+       _dccnet_free(p);
+ 
+-      p = (l ? l->next : proxies) = n;
++      p = *(l ? &l->next : &proxies) = n;
+     } else {
+       l = p;
+       p = p->next;
diff -r 743154871d9c -r dd70072665e0 chat/dircproxy-devel/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/dircproxy-devel/patches/patch-af     Fri Jun 30 15:53:18 2006 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-af,v 1.1 2006/06/30 15:53:18 tron Exp $
+
+--- src/net.c.orig     2006-02-18 22:39:32.000000000 +0000
++++ src/net.c  2006-06-30 16:50:54.000000000 +0100
+@@ -459,7 +459,7 @@
+     return 0;
+   }
+   
+-  l = &(buff == SB_IN ? s->in_buff_last : s->out_buff_last);
++  l = (buff == SB_IN) ? &s->in_buff_last : &s->out_buff_last;
+ 
+   /* Check whether we can just add to the existing buffer */
+   if ((mode == SM_RAW) && *l && ((*l)->mode == mode)) {



Home | Main Index | Thread Index | Old Index