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.
/*
* ngIRCd -- The Next Generation IRC Daemon
/*
* 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
*
* 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
GLOBAL bool
Class_GetMemberReason(const int Class, CLIENT *Client, char *reason, size_t len)
{
GLOBAL bool
Class_GetMemberReason(const int Class, CLIENT *Client, char *reason, size_t len)
{
- char str[COMMAND_LEN] = "listed";
assert(Class < CLASS_COUNT);
assert(Client != NULL);
assert(Class < CLASS_COUNT);
assert(Client != NULL);
+ strlcpy(str, "listed", sizeof(str));
+
if (!Lists_CheckReason(&My_Classes[Class], Client, str, sizeof(str)))
return false;
if (!Lists_CheckReason(&My_Classes[Class], Client, str, sizeof(str)))
return false;
/*
* ngIRCd -- The Next Generation IRC Daemon
/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2013 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
*
* 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
+ * Read in and handle a configuration file.
+ *
+ * @param File Name of the configuration file.
+ * @param fd File descriptor already opened for reading.
-static void Read_Config_File(const char *File, FILE *fd)
+static void
+Read_Config_File(const char *File, FILE *fd)
{
char section[LINE_LEN], str[LINE_LEN], *var, *arg, *ptr;
int i, line = 0;
{
char section[LINE_LEN], str[LINE_LEN], *var, *arg, *ptr;
int i, line = 0;