mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-22 18:55:29 +03:00
63 lines
2.1 KiB
Diff
63 lines
2.1 KiB
Diff
From 35eee84559717e378bf11a882bea9cf0b1b95238 Mon Sep 17 00:00:00 2001
|
|
From: fharvey <fharvey@36e7e03e-8437-11dd-8f23-d9c8888c2974>
|
|
Date: Sun, 19 Feb 2006 16:46:06 +0000
|
|
Subject: [PATCH] Fix GCC 4.0 issue, tanks to lewk@*.edu. Close #39 and #46
|
|
|
|
---
|
|
src/dcc_net.c | 3 ++-
|
|
src/irc_server.c | 6 ++++--
|
|
src/net.c | 3 +--
|
|
3 files changed, 7 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/src/dcc_net.c b/src/dcc_net.c
|
|
index 6b90f29..1902561 100644
|
|
--- a/src/dcc_net.c
|
|
+++ b/src/dcc_net.c
|
|
@@ -368,7 +368,8 @@ int dccnet_expunge_proxies(void) {
|
|
n = p->next;
|
|
_dccnet_free(p);
|
|
|
|
- p = (l ? l->next : proxies) = n;
|
|
+ if (l) l->next = n; else proxies = n;
|
|
+ p = n;
|
|
} else {
|
|
l = p;
|
|
p = p->next;
|
|
diff --git a/src/irc_server.c b/src/irc_server.c
|
|
index 38f4768..4ffdfca 100644
|
|
--- a/src/irc_server.c
|
|
+++ b/src/irc_server.c
|
|
@@ -788,7 +788,8 @@ static int _ircserver_gotmsg(struct ircproxy *p, const char *str) {
|
|
free(s);
|
|
|
|
/* Was in the squelch list, so remove it and stop looking */
|
|
- s = (l ? l->next : p->squelch_modes) = n;
|
|
+ if (l) l->next = n; else p->squelch_modes = n;
|
|
+ s = n;
|
|
squelch = 1;
|
|
break;
|
|
} else {
|
|
@@ -829,7 +830,8 @@ static int _ircserver_gotmsg(struct ircproxy *p, const char *str) {
|
|
free(s);
|
|
|
|
/* Was in the squelch list, so remove it and stop looking */
|
|
- s = (l ? l->next : p->squelch_modes) = n;
|
|
+ if (l) l->next = n; else p->squelch_modes = n;
|
|
+ s = n;
|
|
squelch = 1;
|
|
break;
|
|
} else {
|
|
diff --git a/src/net.c b/src/net.c
|
|
index a971fea..8147acd 100644
|
|
--- a/src/net.c
|
|
+++ b/src/net.c
|
|
@@ -459,8 +459,7 @@ static int _net_buffer(struct sockinfo *s, int buff, int mode,
|
|
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)) {
|
|
(*l)->data = realloc((*l)->data, (*l)->len + len);
|