diff options
author | seungha.son <seungha.son@samsung.com> | 2017-01-11 15:23:05 +0900 |
---|---|---|
committer | seungha.son <seungha.son@samsung.com> | 2017-01-11 15:25:34 +0900 |
commit | 4e95345e417dc81a504a7f87e498b5c2b31ceb51 (patch) | |
tree | ed132a016720c930a9af13f263e7b384bbf0c393 | |
parent | 3c021a7ea6a2b47d7cd90da7580d9580d31f12a4 (diff) | |
download | notification-4e95345e417dc81a504a7f87e498b5c2b31ceb51.tar.gz notification-4e95345e417dc81a504a7f87e498b5c2b31ceb51.tar.bz2 notification-4e95345e417dc81a504a7f87e498b5c2b31ceb51.zip |
Modified type definitions
- This can cause pointers to be assigned to int and vice-versa.
But on a 64-bit system, assigning a pointer to an int causes
the truncation of the high-order 32-bits.
Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: I7d8c1e122af1b4c8a88cc8d1de9e4eaa898f9dec
-rwxr-xr-x | src/notification_setting.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/notification_setting.c b/src/notification_setting.c index aa2df98..8e82987 100755 --- a/src/notification_setting.c +++ b/src/notification_setting.c @@ -866,7 +866,7 @@ static gint _dnd_allow_exception_compare(gconstpointer a, gconstpointer b) dnd_allow_exception_data_a = (dnd_allow_exception_h)a; - if (dnd_allow_exception_data_a->type == (int)b) + if (dnd_allow_exception_data_a->type == GPOINTER_TO_INT(b)) return 0; return -1; @@ -882,7 +882,7 @@ EXPORT_API int notification_system_setting_get_dnd_allow_exceptions(notification return NOTIFICATION_ERROR_INVALID_PARAMETER; } - list = g_list_find_custom(system_setting->dnd_allow_exceptions, (gconstpointer)type, (GCompareFunc)_dnd_allow_exception_compare); + list = g_list_find_custom(system_setting->dnd_allow_exceptions, GINT_TO_POINTER(type), (GCompareFunc)_dnd_allow_exception_compare); if (list) { dnd_allow_exception_data = (dnd_allow_exception_h)list->data; *value = dnd_allow_exception_data->value; @@ -905,7 +905,7 @@ EXPORT_API int notification_system_setting_set_dnd_allow_exceptions(notification } list = g_list_first(system_setting->dnd_allow_exceptions); - list = g_list_find_custom(list, (gconstpointer)type, (GCompareFunc)_dnd_allow_exception_compare); + list = g_list_find_custom(list, GINT_TO_POINTER(type), (GCompareFunc)_dnd_allow_exception_compare); if (list) { dnd_allow_exception_data = (dnd_allow_exception_h)list->data; |