diff options
Diffstat (limited to 'openmp/runtime/src/kmp_utility.c')
| -rw-r--r-- | openmp/runtime/src/kmp_utility.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/openmp/runtime/src/kmp_utility.c b/openmp/runtime/src/kmp_utility.c index d0e74d52fd9..b112e022b43 100644 --- a/openmp/runtime/src/kmp_utility.c +++ b/openmp/runtime/src/kmp_utility.c @@ -314,12 +314,12 @@ __kmp_expand_host_name( char *buffer, size_t size ) DWORD s = size; if (! GetComputerNameA( buffer, & s )) - strcpy( buffer, unknown ); + KMP_STRCPY_S( buffer, size, unknown ); } #else buffer[size - 2] = 0; if (gethostname( buffer, size ) || buffer[size - 2] != 0) - strcpy( buffer, unknown ); + KMP_STRCPY_S( buffer, size, unknown ); #endif } @@ -374,7 +374,7 @@ __kmp_expand_file_name( char *result, size_t rlen, char *pattern ) case 'h': { __kmp_expand_host_name( buffer, sizeof( buffer ) ); - strncpy( pos, buffer, end - pos + 1); + KMP_STRNCPY( pos, buffer, end - pos + 1); if(*end == 0) { while ( *pos ) ++pos; @@ -386,7 +386,7 @@ __kmp_expand_file_name( char *result, size_t rlen, char *pattern ) case 'P': case 'p': { - snp_result = snprintf( pos, end - pos + 1, "%0*d", cpu_width, __kmp_dflt_team_nth ); + snp_result = KMP_SNPRINTF( pos, end - pos + 1, "%0*d", cpu_width, __kmp_dflt_team_nth ); if(snp_result >= 0 && snp_result <= end - pos) { while ( *pos ) ++pos; @@ -399,7 +399,7 @@ __kmp_expand_file_name( char *result, size_t rlen, char *pattern ) case 'i': { pid_t id = getpid(); - snp_result = snprintf( pos, end - pos + 1, "%0*d", width, id ); + snp_result = KMP_SNPRINTF( pos, end - pos + 1, "%0*d", width, id ); if(snp_result >= 0 && snp_result <= end - pos) { while ( *pos ) ++pos; |

