mirror of
https://github.com/openharmony/developtools_bytrace.git
synced 2026-07-19 17:08:09 -04:00
!1 【轻量级 PR】:fix the bug for stoull to the non numeric string
Merge pull request !1 from chuxuezhe11/N/A
This commit is contained in:
@@ -75,10 +75,9 @@ bool IsAppValid()
|
||||
uint64_t GetSysParamTags()
|
||||
{
|
||||
// Get the system parameters of KEY_TRACE_TAG.
|
||||
std::string tagStr = OHOS::system::GetParameter(KEY_TRACE_TAG, "");
|
||||
uint64_t tags = std::stoull(tagStr);
|
||||
if (tagStr == "" || tags == ULLONG_MAX) {
|
||||
fprintf(stderr, "GetSysParamTags error tag: %s.\n", tagStr.c_str());
|
||||
uint64_t tags = OHOS::system::GetUintParameter<uint64_t>(KEY_TRACE_TAG, 0);
|
||||
if (tags == 0) {
|
||||
fprintf(stderr, "GetUintParameter %s error.\n", KEY_TRACE_TAG.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user