INN commit: branches/2.5/innd (cc.c innd.h nc.c)
INN Commit
rra at isc.org
Sun Jul 17 18:27:22 UTC 2011
Date: Sunday, July 17, 2011 @ 11:27:22
Author: iulius
Revision: 9263
clean up innd code
Add the "noreturn" attribute to two functions.
Fix a typo, add a comment, add an explicit comparison to NULL.
Modified:
branches/2.5/innd/cc.c
branches/2.5/innd/innd.h
branches/2.5/innd/nc.c
--------+
cc.c | 3 ++-
innd.h | 4 ++--
nc.c | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
Modified: cc.c
===================================================================
--- cc.c 2011-07-17 18:23:50 UTC (rev 9262)
+++ cc.c 2011-07-17 18:27:22 UTC (rev 9263)
@@ -680,7 +680,7 @@
Mode = OMrunning;
ThrottledbyIOError = false;
- if (NNRPReason && !innconf->readerswhenstopped) {
+ if (NNRPReason != NULL && !innconf->readerswhenstopped) {
av[0] = YES;
av[1] = p;
CCreaders(av);
@@ -1178,6 +1178,7 @@
if (ModeReason)
free(ModeReason);
ModeReason = xstrdup(reason);
+ /* Disallow readers when the server is paused or throttled. */
if (NNRPReason == NULL && !innconf->readerswhenstopped) {
av[0] = NO;
av[1] = ModeReason;
Modified: innd.h
===================================================================
--- innd.h 2011-07-17 18:23:50 UTC (rev 9262)
+++ innd.h 2011-07-17 18:27:22 UTC (rev 9263)
@@ -693,7 +693,7 @@
extern char * MaxLength(const char *p, const char *q);
extern pid_t Spawn(int niceval, int fd0, int fd1, int fd2,
char * const av[]);
-extern void CleanupAndExit(int x, const char *why);
+extern void CleanupAndExit(int x, const char *why) __attribute__ ((noreturn));
extern void JustCleanup(void);
extern void ThrottleIOError(const char *when);
extern void ThrottleNoMatchError(void);
@@ -723,7 +723,7 @@
extern char * CHANname(CHANNEL *cp);
extern int CHANreadtext(CHANNEL *cp);
extern void CHANclose(CHANNEL *cp, const char *name);
-extern void CHANreadloop(void);
+extern void CHANreadloop(void) __attribute__ ((noreturn));
extern void CHANsetup(int i);
extern void CHANshutdown(void);
extern void CHANtracing(CHANNEL *cp, bool Flag);
Modified: nc.c
===================================================================
--- nc.c 2011-07-17 18:23:50 UTC (rev 9262)
+++ nc.c 2011-07-17 18:27:22 UTC (rev 9263)
@@ -151,7 +151,7 @@
int i;
/* XXX could do RCHANremove(cp) here, as the old NCwritetext() used to
- * do, but that would be wrong if the channel is sreaming (because it
+ * do, but that would be wrong if the channel is streaming (because it
* would zap the channel's input buffer). There's no harm in
* never calling RCHANremove here. */
More information about the inn-committers
mailing list