diff options
author | Chris Hall <chris.hall@highwayman.com> | 2011-03-29 19:47:32 +0100 |
---|---|---|
committer | Chris Hall <chris.hall@highwayman.com> | 2011-03-29 19:47:32 +0100 |
commit | 9c99076cf33bfa874db34151e28822f0e392ab3a (patch) | |
tree | e1630b98e0bb01ad8b26c6a50a7824eb41f0c448 /lib/log.c | |
parent | 7e666be965b3ac61b05ccdeca2b61902bc26e172 (diff) | |
download | quagga-9c99076cf33bfa874db34151e28822f0e392ab3a.tar.bz2 quagga-9c99076cf33bfa874db34151e28822f0e392ab3a.tar.xz |
Fix compile on older gcc, and other minor fixes.
Slightly older gcc would not tolerate an offsetof() where the type part
contained a '->' -- replaced foo->bar by foo[0].bar, which is more
readily tolerated.
Fixed assert() in "--more--".
Improved some shut-down code.
Diffstat (limited to 'lib/log.c')
-rw-r--r-- | lib/log.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -971,6 +971,8 @@ closezlog (struct zlog *zl) { assert((zl == zlog_list) && (zl->next == NULL)) ; /* pro tem */ + LOG_LOCK() ; + closelog(); if (zl->file_fd >= 0) close (zl->file_fd) ; @@ -985,10 +987,9 @@ closezlog (struct zlog *zl) uzlog_set_effective_level(zl) ; - if (zl->filename != NULL) - free (zl->filename); - XFREE (MTYPE_ZLOG, zl); + + LOG_UNLOCK() ; } /*------------------------------------------------------------------------------ |