From: Junkyeong Kim Date: Wed, 31 May 2023 05:11:33 +0000 (+0900) Subject: e_info_server: change win_id type to uint64_t X-Git-Tag: accepted/tizen/7.0/unified/20230601.105728^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c6f18db04094e65ea83d49b4eed5ed4bb8c9fe29;p=platform%2Fupstream%2Fenlightenment.git e_info_server: change win_id type to uint64_t Change-Id: I9a9ebd80d4d72b118512dc33e32e3cff48f6b0a4 --- diff --git a/src/bin/e_info_server.c b/src/bin/e_info_server.c index b83562dc2d..4fe0d56657 100644 --- a/src/bin/e_info_server.c +++ b/src/bin/e_info_server.c @@ -4792,30 +4792,30 @@ static Eldbus_Message * _e_info_server_cb_selected_buffer_dump(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg) { Eldbus_Message *reply = eldbus_message_method_return_new(msg); - const char *win_id_s = NULL; + const char *win_str = NULL; const char *path = NULL; - int32_t win_id = 0; + uint64_t win_id = 0; + unsigned long tmp; Evas_Object *o; - int ret; + Eina_Bool res = EINA_FALSE; Dump_Win_Data *dump = NULL; E_Capture_Save_State state; - if (!eldbus_message_arguments_get(msg, "ss", &win_id_s, &path)) + if (!eldbus_message_arguments_get(msg, "ss", &win_str, &path)) { ERR("Error getting arguments."); return reply; } - if (!win_id_s) win_id = 0; - else - { - if (strlen(win_id_s) >= 2 && win_id_s[0] == '0' && win_id_s[1] == 'x') - ret = sscanf(win_id_s, "%zx", (uintptr_t *)&win_id); - else - ret = sscanf(win_id_s, "%d", &win_id); - EINA_SAFETY_ON_FALSE_GOTO(ret == 1, end); - } + if (strlen(win_str) >= 2 && win_str[0] == '0' && win_str[1] == 'x') + res = e_util_string_to_ulong(win_str, &tmp, 16); + else + res = e_util_string_to_ulong(win_str, &tmp, 10); + + EINA_SAFETY_ON_FALSE_GOTO(res == EINA_TRUE, end); + + win_id = (uint64_t)tmp; for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o)) {