[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Correct code in dbootstrap/main.c



The following fix should be included to avoid printing bogus values on
systems where sizeof(int) < sizeof(long).  This removes a compile
warning on i386, but I suspect printed output would be bogus on alpha
or ia64.

 - use %ld when printing 'long' content.

Index: main.c
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/main.c,v
retrieving revision 1.146
diff -u -3 -p -u -r1.146 main.c
--- main.c      2002/03/06 15:28:18     1.146
+++ main.c      2002/03/11 23:42:28
@@ -966,8 +978,8 @@ int main (void) {
 #endif
        if (mem < min_mem) {
          snprintf(prtbuf, PRTBUFSIZE - 1, _(
-"Your computer seems to have only %dMB of RAM.  For this\n"
-"version of Debian, a minimum of %dMB is recommended.\n"),
+"Your computer seems to have only %ldMB of RAM.  For this\n"
+"version of Debian, a minimum of %ldMB is recommended.\n"),
                   mem, min_mem);
          wideMessageBox(prtbuf, _("Warning: Low Memory"));
        }



Reply to: