[maemo-commits] [maemo-commits] r12275 - projects/haf/trunk/hildon-fm/hildon-fm
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Jun 13 16:08:24 EEST 2007
- Previous message: [maemo-commits] r12274 - projects/haf/tags/libnotify
- Next message: [maemo-commits] r12276 - in projects/haf/trunk/hildon-desktop: . data libhildondesktop src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: marivoll
Date: 2007-06-13 16:08:22 +0300 (Wed, 13 Jun 2007)
New Revision: 12275
Modified:
projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-storage-dialog.c
Log:
Do not include glib/gi18n.h, but do include
hildon-file-common-private.h to pick up the right definition of '_'.
(file_system_storage_dialog_stats_get_disk): Avoid overflow when
multiplying with blocksize.
Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-storage-dialog.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-storage-dialog.c 2007-06-13 13:03:20 UTC (rev 12274)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-storage-dialog.c 2007-06-13 13:08:22 UTC (rev 12275)
@@ -28,7 +28,6 @@
#include <errno.h>
#include <sys/statfs.h>
-#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <libgnomevfs/gnome-vfs.h>
#include <dbus/dbus.h>
@@ -36,6 +35,7 @@
#include <hildon/hildon.h>
+#include "hildon-file-common-private.h"
#include "hildon-file-system-storage-dialog.h"
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), HILDON_TYPE_FILE_SYSTEM_STORAGE_DIALOG, HildonFileSystemStorageDialogPriv))
@@ -531,11 +531,13 @@
if (statfs (path, &st) == 0) {
if (total) {
- *total = st.f_bsize * st.f_blocks;
+ *total = st.f_blocks;
+ *total *= st.f_bsize;
}
if (available) {
- *available = st.f_bsize * st.f_bfree;
+ *available = st.f_bfree;
+ *available *= st.f_bsize;
}
return TRUE;
- Previous message: [maemo-commits] r12274 - projects/haf/tags/libnotify
- Next message: [maemo-commits] r12276 - in projects/haf/trunk/hildon-desktop: . data libhildondesktop src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
