build error
This commit is contained in:
parent
18bc5a048f
commit
6749067c33
|
@ -324,7 +324,7 @@ void killAllCheckpointTrans(SMnode *pMnode, SVgroupChangeInfo *pChangeInfo) {
|
|||
|
||||
size_t len = 0;
|
||||
void *pKey = taosHashGetKey(pDb, &len);
|
||||
stpncpy(p, pKey, 127);
|
||||
tstrncpy(p, pKey, 128);
|
||||
|
||||
int32_t code = doKillCheckpointTrans(pMnode, pKey, len);
|
||||
if (code) {
|
||||
|
|
|
@ -87,18 +87,18 @@ char *stpncpy(char *dest, const char *src, int n) {
|
|||
if (size == n) return dest;
|
||||
return memset(dest, '\0', n - size);
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
char *taosStrndup(const char *s, int size) {
|
||||
if (s == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
char* p = strndup(s, size);
|
||||
char *p = strndup(s, size);
|
||||
if (NULL == p) {
|
||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t taosStr2int64(const char *str, int64_t *val) {
|
||||
if (str == NULL || val == NULL) {
|
||||
|
|
Loading…
Reference in New Issue