[nautilus/gnome-2-28] Ensure ABS calls work on difference of unsigned values
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-2-28] Ensure ABS calls work on difference of unsigned values
- Date: Fri, 27 Nov 2009 14:00:09 +0000 (UTC)
commit f67f8b4bc800d0096f26443fcd815675466e2b7f
Author: Alexander Larsson <alexl redhat com>
Date: Thu Nov 19 12:42:17 2009 +0100
Ensure ABS calls work on difference of unsigned values
guint64 - guint64 is of type guint64, so ABS doesn't work on it.
Cast to gint64 to make sure this works.
(cherry picked from commit 1f8f54f4777343dda87043e444a24c3f86e90439)
libnautilus-private/nautilus-file-operations.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index 29d5e12..ba1020c 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -1396,7 +1396,7 @@ report_delete_progress (CommonJob *job,
now = g_thread_gettime ();
if (transfer_info->last_report_time != 0 &&
- ABS (transfer_info->last_report_time - now) < 100 * NSEC_PER_MSEC) {
+ ABS ((gint64)(transfer_info->last_report_time - now)) < 100 * NSEC_PER_MSEC) {
return;
}
transfer_info->last_report_time = now;
@@ -2820,7 +2820,7 @@ report_copy_progress (CopyMoveJob *copy_job,
now = g_thread_gettime ();
if (transfer_info->last_report_time != 0 &&
- ABS (transfer_info->last_report_time - now) < 100 * NSEC_PER_MSEC) {
+ ABS ((gint64)(transfer_info->last_report_time - now)) < 100 * NSEC_PER_MSEC) {
return;
}
transfer_info->last_report_time = now;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]