minor changes
This commit is contained in:
parent
5891779fe1
commit
db3999eacb
|
@ -39,8 +39,7 @@ int tdAllocMemForCol(SDataCol *pCol, int maxPoints) {
|
|||
if (pCol->spaceSize < spaceNeeded) {
|
||||
void *ptr = realloc(pCol->pData, spaceNeeded);
|
||||
if (ptr == NULL) {
|
||||
uDebug("malloc failure, size:%" PRId64 " failed, reason:%s", (int64_t)spaceNeeded,
|
||||
strerror(errno));
|
||||
uDebug("malloc failure, size:%" PRId64 " failed, reason:%s", (int64_t)spaceNeeded, strerror(errno));
|
||||
return -1;
|
||||
} else {
|
||||
pCol->pData = ptr;
|
||||
|
@ -66,7 +65,6 @@ int tdAllocMemForCol(SDataCol *pCol, int maxPoints) {
|
|||
* Duplicate the schema and return a new object
|
||||
*/
|
||||
STSchema *tdDupSchema(const STSchema *pSchema) {
|
||||
|
||||
int tlen = sizeof(STSchema) + sizeof(STColumn) * schemaNCols(pSchema);
|
||||
STSchema *tSchema = (STSchema *)malloc(tlen);
|
||||
if (tSchema == NULL) return NULL;
|
||||
|
@ -659,9 +657,7 @@ static int compareColIdx(const void* a, const void* b) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void tdSortKVRowByColIdx(SKVRow row) {
|
||||
qsort(kvRowColIdx(row), kvRowNCols(row), sizeof(SColIdx), compareColIdx);
|
||||
}
|
||||
void tdSortKVRowByColIdx(SKVRow row) { qsort(kvRowColIdx(row), kvRowNCols(row), sizeof(SColIdx), compareColIdx); }
|
||||
|
||||
int tdSetKVRowDataOfCol(SKVRow *orow, int16_t colId, int8_t type, void *value) {
|
||||
SColIdx *pColIdx = NULL;
|
||||
|
|
Loading…
Reference in New Issue