Changeset 531
- Timestamp:
- Apr 27, 2004, 12:39:48 PM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 2 edited
-
sys/psString.c (modified) (4 diffs)
-
sysUtils/psString.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psString.c
r440 r531 8 8 * @author Eric Van Alst, MHPCC 9 9 * 10 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-04- 19 19:10:26$10 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-04-27 22:39:48 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include "psString.h" 22 22 #include "psMemory.h" 23 #include "psError.h" 23 24 24 25 /******************************************************************************/ … … 71 72 ) 72 73 { 74 // Check the number of characters to copy is non-negative 75 if ( nChar < 0 ) { 76 // Log error message and return NULL 77 psError(__FILE__,"psStringNCopy with negative count specified %d", 78 nChar); 79 return NULL; 80 } 73 81 // Allocate memory using psAlloc function - nChar bytes 74 82 // Copy input string to memory allocated up to nChar characters … … 77 85 } 78 86 87 -
trunk/psLib/src/sysUtils/psString.c
r440 r531 8 8 * @author Eric Van Alst, MHPCC 9 9 * 10 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-04- 19 19:10:26$10 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-04-27 22:39:48 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include "psString.h" 22 22 #include "psMemory.h" 23 #include "psError.h" 23 24 24 25 /******************************************************************************/ … … 71 72 ) 72 73 { 74 // Check the number of characters to copy is non-negative 75 if ( nChar < 0 ) { 76 // Log error message and return NULL 77 psError(__FILE__,"psStringNCopy with negative count specified %d", 78 nChar); 79 return NULL; 80 } 73 81 // Allocate memory using psAlloc function - nChar bytes 74 82 // Copy input string to memory allocated up to nChar characters … … 77 85 } 78 86 87
Note:
See TracChangeset
for help on using the changeset viewer.
