]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Always write out two digits for single-byte quantities in arrays
authorTed Lemon <source@isc.org>
Sun, 8 Jun 1997 03:08:29 +0000 (03:08 +0000)
committerTed Lemon <source@isc.org>
Sun, 8 Jun 1997 03:08:29 +0000 (03:08 +0000)
server/db.c

index dac8775ca69db096ce2e34d6d1988820129f202d..6fb35dd5b0bb0202705d1ec94624674aeb2a78d1 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: db.c,v 1.11 1997/05/09 08:22:00 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: db.c,v 1.12 1997/06/08 03:08:29 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -106,13 +106,13 @@ int write_lease (lease)
        if (lease -> uid_len) {
                int i;
                errno = 0;
-               fprintf (db_file, "\n\tuid %x", lease -> uid [0]);
+               fprintf (db_file, "\n\tuid %2.2x", lease -> uid [0]);
                if (errno) {
                        ++errors;
                }
                for (i = 1; i < lease -> uid_len; i++) {
                        errno = 0;
-                       fprintf (db_file, ":%x", lease -> uid [i]);
+                       fprintf (db_file, ":%2.2x", lease -> uid [i]);
                        if (errno) {
                                ++errors;
                        }