1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-10-15 14:47:38 +00:00

Fix two K&R C portability issues

Fix the following two errors emitted by the Apple K&R C compiler
on Apple A/UX:

"./class.c", line 47: no automatic aggregate initialization
"./class.c", line 47: illegal lhs of assignment operator

"./conf.c", line 1052: syntax error

Tested on A/UX 3.1.1.

(cherry picked from commit a4ed90ba9a)
This commit is contained in:
Alexander Barton
2014-03-16 20:07:08 +01:00
parent 1d3137ff69
commit c0c9b1b8ac
2 changed files with 11 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,11 +50,13 @@ Class_Exit(void)
GLOBAL bool
Class_GetMemberReason(const int Class, CLIENT *Client, char *reason, size_t len)
{
char str[COMMAND_LEN] = "listed";
char str[COMMAND_LEN];
assert(Class < CLASS_COUNT);
assert(Client != NULL);
strlcpy(str, "listed", sizeof(str));
if (!Lists_CheckReason(&My_Classes[Class], Client, str, sizeof(str)))
return false;