From: Adrian S. <a3s...@us...> - 2005-06-21 07:27:51
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18217 Modified Files: mlog.c Log Message: Fix from Anas Nashif - fixes segfault on x86_64 Index: mlog.c =================================================================== RCS file: /cvsroot/sblim/sfcb/mlog.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mlog.c 26 Apr 2005 21:58:47 -0000 1.2 +++ mlog.c 21 Jun 2005 07:27:42 -0000 1.3 @@ -12,8 +12,9 @@ * * Author: Viktor Mihajlovski <mih...@de...m> * Contributors: Michael Schuele <sch...@de...> + * Anas Nashif <na...@pl...> * - * Description: Metric Defintiona and Value data types. + * Description: Logger support. * */ @@ -32,7 +33,7 @@ void mlogf(int priority, int errout, const char *fmt, ...) { - va_list ap; + va_list ap,apc; int priosysl; char buf[4096]; @@ -55,7 +56,9 @@ syslog(priosysl,buf); if (errout) { - vfprintf(stderr,fmt,ap); + va_start(apc,fmt); + vfprintf(stderr,fmt,apc); + va_end(apc); } va_end(ap); } |