[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

routed Makefile



hello all,

sorry for being rude and just dumping diffs here.

the provided diff encloses macro-parameters in parentheses.
The macro is defined in the Makefile.

The changes to def.h clarify that the argument is
a constant string. rtmalloc() is only invoked with a stringliteral.
this string is then passed to syslog.
those string-literals might be replaced with __func__?

cheers,
jan



Index: Makefile
===================================================================
RCS file: /scratch/cvs/src/sbin/routed/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- Makefile    25 Apr 2004 16:28:32 -0000      1.15
+++ Makefile    9 May 2006 17:20:19 -0000
@@ -3,7 +3,7 @@
 PROG=  routed
 SRCS=  if.c input.c main.c output.c parms.c radix.c rdisc.c table.c trace.c
 MAN=   routed.8
-CFLAGS+=-D_ROUTED -D'min(a,b)=(a < b ? a : b)' -D'log=syslog'
+CFLAGS+=-D_ROUTED -D'min(a,b)=((a) < (b) ? (a) : (b))' -D'log=syslog'
 CFLAGS+=-D'panic(s)={log(LOG_ERR, "%s", s); exit(1);}'
 SUBDIR=        rtquery

Index: defs.h
===================================================================
RCS file: /scratch/cvs/src/sbin/routed/defs.h,v
retrieving revision 1.8
diff -u -r1.8 defs.h
--- defs.h      2 Jun 2003 20:06:17 -0000       1.8
+++ defs.h      9 May 2006 16:46:19 -0000
@@ -450,7 +450,7 @@
 extern char    *naddr_ntoa(naddr);
 extern char    *saddr_ntoa(struct sockaddr *);

-extern void    *rtmalloc(size_t, char *);
+extern void    *rtmalloc(size_t, const char *);
 extern void    timevaladd(struct timeval *, struct timeval *);
 extern void    intvl_random(struct timeval *, u_long, u_long);
 extern int     getnet(char *, naddr *, naddr *);
Index: main.c
===================================================================
RCS file: /scratch/cvs/src/sbin/routed/main.c,v
retrieving revision 1.19
diff -u -r1.19 main.c
--- main.c      23 Mar 2005 18:06:07 -0000      1.19
+++ main.c      9 May 2006 16:46:30 -0000
@@ -748,7 +748,7 @@
  */
 void *
 rtmalloc(size_t size,
-        char *msg)
+        const char *msg)
 {
        void *p = malloc(size);
        if (p == 0)



Visit your host, monkey.org