mirror of
https://gitee.com/openharmony/communication_wifi.git
synced 2024-12-18 20:40:11 +00:00
tdd
Signed-off-by: sunjingqiang <17319862417@163.com>
This commit is contained in:
parent
669e3eb7c0
commit
323bf3905c
@ -18,7 +18,6 @@ module_output_path = "wifi/base_test"
|
||||
config("module_private_config") {
|
||||
visibility = [ ":*" ]
|
||||
include_dirs = [
|
||||
"//commonlibrary/c_utils/base/include",
|
||||
"$WIFI_ROOT_DIR/test/wifi_standard/wifi_base",
|
||||
]
|
||||
}
|
||||
@ -41,7 +40,6 @@ ohos_unittest("base_unittest") {
|
||||
|
||||
include_dirs = [
|
||||
"$WIFI_ROOT_DIR/base/cRPC/include",
|
||||
"//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
|
||||
]
|
||||
|
||||
ldflags = [
|
||||
|
@ -93,7 +93,7 @@ static int ExpandReadCache(Context *context, int len)
|
||||
capacity += context->rCapacity;
|
||||
left += context->rCapacity;
|
||||
}
|
||||
std::string *p = std::string(reinterpret_cast<char *>calloc(capacity, sizeof(char)));
|
||||
char *p = (char *)calloc(capacity, sizeof(char));
|
||||
if (p == nullptr) {
|
||||
return -1;
|
||||
}
|
||||
@ -106,13 +106,11 @@ static int ExpandReadCache(Context *context, int len)
|
||||
free(p);
|
||||
return -1;
|
||||
}
|
||||
std::string *pFree = std::string(context->szRead);
|
||||
context->szRead = p;
|
||||
if (context->rBegin > context->rEnd) {
|
||||
context->rEnd += context->rCapacity;
|
||||
}
|
||||
context->rCapacity = capacity;
|
||||
free(pFree);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user