Changeset 8472
- Timestamp:
- Aug 22, 2006, 11:36:33 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psTrace.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psTrace.c
r8441 r8472 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.7 0$ $Name: not supported by cvs2svn $12 * @date $Date: 2006-08-2 1 22:11:39$11 * @version $Revision: 1.71 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2006-08-22 21:36:33 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 55 55 #define MAX_HOSTNAME_LENGTH 256 56 56 #define MAX_HEADER_LENGTH 256 57 #define MAX_TRACE_LENGTH 1024 57 58 58 59 … … 591 592 592 593 if (traceMsg) { 593 char line[ 1024];594 char line[MAX_TRACE_LENGTH + 1]; 594 595 595 596 // We indent each message one space for each level of the message. … … 597 598 write (traceFD, " ", 1); 598 599 } 599 vs printf(line, format, ap);600 vsnprintf(line, MAX_TRACE_LENGTH, format, ap); 600 601 write (traceFD, line, strlen(line)); 601 602 if (line[strlen(line) - 1] != '\n') {
Note:
See TracChangeset
for help on using the changeset viewer.
