[nautilus] file-undo-operations: use ABS macro instead of abs()
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] file-undo-operations: use ABS macro instead of abs()
- Date: Fri, 5 Aug 2016 10:02:05 +0000 (UTC)
commit e3025d46e3c94b575928c38cef61ce46347e74c2
Author: Ernestas Kulik <ernestask src gnome org>
Date: Thu Aug 4 20:20:15 2016 +0300
file-undo-operations: use ABS macro instead of abs()
trash_retrieve_files_to_restore_thread() calls abs() with an argument of
type long, whereas abs() accepts ints. This commit fixes that by
replacing the call with the ABS macro, which is type-agnostic.
https://bugzilla.gnome.org/show_bug.cgi?id=769526
src/nautilus-file-undo-operations.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-file-undo-operations.c b/src/nautilus-file-undo-operations.c
index 82d7aee..17b8c1d 100644
--- a/src/nautilus-file-undo-operations.c
+++ b/src/nautilus-file-undo-operations.c
@@ -1147,7 +1147,7 @@ trash_retrieve_files_to_restore_thread (GTask *task,
g_date_time_unref (date);
}
- if (abs (orig_trash_time - trash_time) <= TRASH_TIME_EPSILON) {
+ if (ABS (orig_trash_time - trash_time) <= TRASH_TIME_EPSILON) {
/* File in the trash */
item = g_file_get_child (trash, g_file_info_get_name (info));
g_hash_table_insert (to_restore, item, g_object_ref (origfile));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]