Use new remapping of strncpy -> lam_strncpy
This commit was SVN r486.
Этот коммит содержится в:
родитель
22fa2312be
Коммит
d1d4389627
@ -155,7 +155,7 @@ lam_argv_split(const char *src_string, int delimiter)
|
||||
if (NULL == argtemp)
|
||||
return NULL;
|
||||
|
||||
lam_strncpy(argtemp, src_string, arglen);
|
||||
strncpy(argtemp, src_string, arglen);
|
||||
argtemp[arglen] = '\0';
|
||||
|
||||
if (LAM_ERROR == lam_argv_add(&argc, &argv, argtemp)) {
|
||||
@ -169,7 +169,7 @@ lam_argv_split(const char *src_string, int delimiter)
|
||||
/* short argument, copy to buffer and add */
|
||||
|
||||
else {
|
||||
lam_strncpy(arg, src_string, arglen);
|
||||
strncpy(arg, src_string, arglen);
|
||||
arg[arglen] = '\0';
|
||||
|
||||
if (LAM_ERROR == lam_argv_add(&argc, &argv, arg))
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "lam/mem/malloc.h"
|
||||
#include "lam/util/if.h"
|
||||
#include "lam/util/output.h"
|
||||
#include "lam/util/strncpy.h"
|
||||
|
||||
#ifndef IF_NAMESIZE
|
||||
#define IF_NAMESIZE 32
|
||||
|
@ -7,6 +7,12 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* Use lam_strncpy() instead of strncpy()
|
||||
*/
|
||||
#define strncpy lam_strncpy
|
||||
|
||||
|
||||
char *lam_strncpy(char *dest, const char *src, size_t len);
|
||||
|
||||
#endif /* LAM_STRNCPY_H */
|
||||
|
@ -31,7 +31,7 @@ MPI_Comm_set_name(MPI_Comm comm, char *name)
|
||||
|
||||
/* Copy in the name */
|
||||
|
||||
lam_strncpy(comm->c_name, name, MPI_MAX_OBJECT_NAME);
|
||||
strncpy(comm->c_name, name, MPI_MAX_OBJECT_NAME);
|
||||
comm->c_name[MPI_MAX_OBJECT_NAME - 1] = 0;
|
||||
|
||||
/* -- Tracing information for new communicator name -- */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user