diff --git a/interfaces/kits/samgr/common.h b/interfaces/kits/samgr/common.h
index adc924c029f5816ff430cc39b92cb0fd6c7fda8c..2be589d6a14f26e783ea2a8975126ba97084397b 100644
--- a/interfaces/kits/samgr/common.h
+++ b/interfaces/kits/samgr/common.h
@@ -108,7 +108,7 @@ typedef struct SimpleVector {
/** Peak value of the number of stored data records. The initial value is 0. */
int16 top;
/** Number of data records that have been released. The initial value is 0. */
- int16 free;
+ int16 fre;
/** Data storage pointer */
void **data;
/**
diff --git a/samgr/source/common.c b/samgr/source/common.c
index cc23a7cdded3d864bfdfddeca67e4eaef78893bb..e65d4e961e1904c6f98b750ea280a841a1ba09c7 100644
--- a/samgr/source/common.c
+++ b/samgr/source/common.c
@@ -34,7 +34,7 @@ void VECTOR_Clear(Vector *vector)
SAMGR_Free(vector->data);
vector->max = 0;
vector->top = 0;
- vector->free = 0;
+ vector->fre = 0;
vector->data = NULL;
}
@@ -50,7 +50,7 @@ int16 VECTOR_Add(Vector *vector, void *element)
for (i = vector->top - (int16)1; i >= 0; --i) {
if (vector->data[i] == NULL) {
vector->data[i] = element;
- vector->free--;
+ vector->fre--;
return i;
}
}
@@ -94,7 +94,7 @@ void *VECTOR_Swap(Vector *vector, int16 index, void *element)
return NULL;
}
if (element == NULL) {
- vector->free++;
+ vector->fre++;
}
void *oldElement = vector->data[index];
vector->data[index] = element;
@@ -150,5 +150,5 @@ int16 VECTOR_Num(Vector *vector)
if (vector == NULL) {
return INVALID_INDEX;
}
- return vector->top - vector->free;
+ return vector->top - vector->fre;
}