IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 22, 2006, 11:36:33 AM (20 years ago)
Author:
Paul Price
Message:

Enforcing maximum line length for trace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psTrace.c

    r8441 r8472  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.70 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2006-08-21 22:11:39 $
     11 *  @version $Revision: 1.71 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2006-08-22 21:36:33 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5555#define MAX_HOSTNAME_LENGTH 256
    5656#define MAX_HEADER_LENGTH 256
     57#define MAX_TRACE_LENGTH 1024
    5758
    5859
     
    591592
    592593        if (traceMsg) {
    593             char line[1024];
     594            char line[MAX_TRACE_LENGTH + 1];
    594595
    595596            // We indent each message one space for each level of the message.
     
    597598                write (traceFD, " ", 1);
    598599            }
    599             vsprintf(line, format, ap);
     600            vsnprintf(line, MAX_TRACE_LENGTH, format, ap);
    600601            write (traceFD, line, strlen(line));
    601602            if (line[strlen(line) - 1] != '\n') {
Note: See TracChangeset for help on using the changeset viewer.