/[LeafOK_CVS]/lbbs/src/log.c
ViewVC logotype

Diff of /lbbs/src/log.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.20 by sysadm, Wed Jun 4 13:42:53 2025 UTC Revision 1.21 by sysadm, Wed Jun 4 14:01:29 2025 UTC
# Line 14  Line 14 
14   *                                                                         *   *                                                                         *
15   ***************************************************************************/   ***************************************************************************/
16    
17    #include "log.h"
18  #include "io.h"  #include "io.h"
19    #include "common.h"
20  #include <stdio.h>  #include <stdio.h>
21  #include <stdarg.h>  #include <stdarg.h>
22  #include <sys/types.h>  #include <sys/types.h>
# Line 70  int log_common(const char *format, ...) Line 72  int log_common(const char *format, ...)
72  {  {
73          va_list args;          va_list args;
74          int retval;          int retval;
75          char buf[1024];          char buf[LINE_BUFFER_LEN];
76    
77          log_head(buf, sizeof(buf));          log_head(buf, sizeof(buf));
78          strncat(buf, format, sizeof(buf) - strnlen(buf, sizeof(buf)));          strncat(buf, format, sizeof(buf) - strnlen(buf, sizeof(buf)));
# Line 88  int log_error(const char *format, ...) Line 90  int log_error(const char *format, ...)
90  {  {
91          va_list args;          va_list args;
92          int retval;          int retval;
93          char buf[1024];          char buf[LINE_BUFFER_LEN];
94    
95          log_head(buf, sizeof(buf));          log_head(buf, sizeof(buf));
96          strncat(buf, format, sizeof(buf) - strnlen(buf, sizeof(buf)));          strncat(buf, format, sizeof(buf) - strnlen(buf, sizeof(buf)));


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1