guname: cast problem with fsusage info
- From: Tomislav Vujec <tvujec CARNet hr>
- To: gnome-devel-list gnome org
- Subject: guname: cast problem with fsusage info
- Date: Fri, 26 Feb 1999 15:55:06 +0100
Hi!
There is a problem with guname. In the fsusage message %ld format is
used, but without explicit cast for parameters. I am sending the patch
for this problem.
Regards,
Tomislav
Index: moreinfo.c
===================================================================
RCS file: /cvs/gnome/gnome-utils/mini-utils/guname/moreinfo.c,v
retrieving revision 1.18
diff -u -r1.18 moreinfo.c
--- moreinfo.c 1999/02/15 04:59:58 1.18
+++ moreinfo.c 1999/02/26 14:39:15
@@ -336,11 +336,11 @@
len = strlen (device_info_format) + (MAX_ITOA_LEN * 5);
s = g_malloc(len);
g_snprintf(s, len, device_info_format,
- BLOCKS_TO_MB(fsusage.blocks),
- BLOCKS_TO_MB(fsusage.bavail),
- BLOCKS_TO_MB(fsusage.bfree),
- fsusage.files,
- fsusage.ffree);
+ (long) BLOCKS_TO_MB(fsusage.blocks),
+ (long) BLOCKS_TO_MB(fsusage.bavail),
+ (long) BLOCKS_TO_MB(fsusage.bfree),
+ (long) fsusage.files,
+ (long) fsusage.ffree);
fs_info[fs_numbers] = s;
percent_full = g_malloc(sizeof(gdouble));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]