Changeset 6132 for branches/eam_rel9_b1/psLib/src/sys/psString.c
- Timestamp:
- Jan 21, 2006, 1:44:37 PM (20 years ago)
- File:
-
- 1 edited
-
branches/eam_rel9_b1/psLib/src/sys/psString.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_rel9_b1/psLib/src/sys/psString.c
r6025 r6132 12 12 * @author Eric Van Alst, MHPCC 13 13 * 14 * @version $Revision: 1.21.6. 1$ $Name: not supported by cvs2svn $15 * @date $Date: 2006-01- 17 09:23:21$14 * @version $Revision: 1.21.6.2 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2006-01-21 23:44:37 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 32 32 // Copy input string to memory just allocated 33 33 // Return the copy 34 return strcpy(psAlloc(strlen(string) + 1), string); 34 // Pass through NULL values 35 return string ? strcpy(psAlloc(strlen(string) + 1), string) : NULL; 35 36 } 36 37 … … 50 51 // Copy input string to memory allocated up to nChar characters 51 52 // Return the copy 52 returnValue = strncpy(psAlloc((size_t) nChar + 1), string, (size_t) nChar); 53 // Pass through NULL values 54 returnValue = 55 string ? strncpy(psAlloc((size_t) nChar + 1), string, (size_t) nChar) 56 : NULL; 53 57 54 58 // Ensure the last byte is NULL character
Note:
See TracChangeset
for help on using the changeset viewer.
