From 74368eea81942366e4e4c5b26df9863d807677a4 Mon Sep 17 00:00:00 2001 From: Junkyeong Kim Date: Wed, 31 May 2023 14:11:33 +0900 Subject: [PATCH] e_info_server: change win_id type to uint64_t Change-Id: I9a9ebd80d4d72b118512dc33e32e3cff48f6b0a4 --- src/bin/e_info_server.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/bin/e_info_server.c b/src/bin/e_info_server.c index 658f57b..32ce286 100644 --- a/src/bin/e_info_server.c +++ b/src/bin/e_info_server.c @@ -4550,30 +4550,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)) { -- 2.7.4