diff toys/other/ifconfig.c @ 1714:0c8ef714cf03 draft

Patches from Elliott Hughes to fix various printf() format strings. (Don't specify the space flag when it's the default behavior. The ifconfig stuff was actual bugs.)
author Rob Landley <rob@landley.net>
date Sun, 01 Mar 2015 16:08:51 -0600
parents 8d52be1c6cf3
children 57f2a26fa92c
line wrap: on
line diff
--- a/toys/other/ifconfig.c	Sun Mar 01 15:58:40 2015 -0600
+++ b/toys/other/ifconfig.c	Sun Mar 01 16:08:51 2015 -0600
@@ -254,7 +254,7 @@
     xprintf("%10c", ' ');
     if(ifre.ifr_map.irq) xprintf("Interrupt:%d ", ifre.ifr_map.irq);
     if(ifre.ifr_map.base_addr >= 0x100) // IO_MAP_INDEX
-      xprintf("Base address:0x%lx ", ifre.ifr_map.base_addr);
+      xprintf("Base address:0x%x ", ifre.ifr_map.base_addr);
     if(ifre.ifr_map.mem_start)
       xprintf("Memory:%lx-%lx ", ifre.ifr_map.mem_start, ifre.ifr_map.mem_end);
     if(ifre.ifr_map.dma) xprintf("DMA chan:%x ", ifre.ifr_map.dma);
@@ -449,7 +449,7 @@
 
       if (!argv[1]) {
         toys.exithelp++;
-        error_exit(*argv);
+        error_exit("%s", *argv);
       }
 
       plen = get_addrinfo(argv[1], AF_INET6, &ifre6.addr);