mirror of
https://gitee.com/openharmony/startup_init
synced 2024-12-14 06:28:44 +00:00
!1820 give udid a default value
Merge pull request !1820 from RingKing/master
This commit is contained in:
commit
ed5e8f4dad
@ -28,6 +28,7 @@ extern "C" {
|
||||
|
||||
int AclGetDevUdid(char *udid, int size)
|
||||
{
|
||||
const char* defaultVal = "1234567890";
|
||||
if (udid == nullptr || size < UDID_LEN) {
|
||||
return SYSPARAM_INVALID_INPUT;
|
||||
}
|
||||
@ -38,6 +39,8 @@ int AclGetDevUdid(char *udid, int size)
|
||||
int ret = instance.GetUdid(result);
|
||||
if (ret == 0) {
|
||||
ret = strcpy_s(udid, size, result.c_str());
|
||||
} else {
|
||||
ret = strcpy_s(udid, size, defaultVal);
|
||||
}
|
||||
#else
|
||||
int ret = GetDevUdid_(udid, size);
|
||||
|
Loading…
Reference in New Issue
Block a user