mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Merge pull request #1488 from emilengler/remove-unused-var
core: remove unused len variable
(cherry picked from commit f04375668c
)
This commit is contained in:
parent
590ca4dbdf
commit
5a0dc0db09
@ -222,7 +222,7 @@ NETSPLIT_CHAN_REC *netsplit_find_channel(IRC_SERVER_REC *server,
|
|||||||
int quitmsg_is_split(const char *msg)
|
int quitmsg_is_split(const char *msg)
|
||||||
{
|
{
|
||||||
const char *host2, *p;
|
const char *host2, *p;
|
||||||
int prev, len, host1_dot, host2_dot;
|
int prev, host1_dot, host2_dot;
|
||||||
|
|
||||||
g_return_val_if_fail(msg != NULL, FALSE);
|
g_return_val_if_fail(msg != NULL, FALSE);
|
||||||
|
|
||||||
@ -242,7 +242,8 @@ int quitmsg_is_split(const char *msg)
|
|||||||
- can't contain ':' or '/' chars (some servers allow URLs)
|
- can't contain ':' or '/' chars (some servers allow URLs)
|
||||||
*/
|
*/
|
||||||
host2 = NULL;
|
host2 = NULL;
|
||||||
prev = '\0'; len = 0; host1_dot = host2_dot = 0;
|
prev = '\0';
|
||||||
|
host1_dot = host2_dot = 0;
|
||||||
while (*msg != '\0') {
|
while (*msg != '\0') {
|
||||||
if (*msg == ' ') {
|
if (*msg == ' ') {
|
||||||
if (prev == '.' || prev == '\0') {
|
if (prev == '.' || prev == '\0') {
|
||||||
@ -254,7 +255,7 @@ int quitmsg_is_split(const char *msg)
|
|||||||
return FALSE; /* only one space allowed */
|
return FALSE; /* only one space allowed */
|
||||||
if (!host1_dot)
|
if (!host1_dot)
|
||||||
return FALSE; /* host1 didn't have domain */
|
return FALSE; /* host1 didn't have domain */
|
||||||
host2 = msg+1; len = -1;
|
host2 = msg + 1;
|
||||||
} else if (*msg == '.') {
|
} else if (*msg == '.') {
|
||||||
if (prev == '\0' || prev == ' ' || prev == '.') {
|
if (prev == '\0' || prev == ' ' || prev == '.') {
|
||||||
/* domains can't start with '.'
|
/* domains can't start with '.'
|
||||||
@ -270,7 +271,7 @@ int quitmsg_is_split(const char *msg)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
prev = *msg;
|
prev = *msg;
|
||||||
msg++; len++;
|
msg++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!host2_dot || prev == '.')
|
if (!host2_dot || prev == '.')
|
||||||
|
Loading…
Reference in New Issue
Block a user