]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Reverse output of conversion routine.
authorTed Lemon <source@isc.org>
Tue, 6 Jul 1999 16:51:19 +0000 (16:51 +0000)
committerTed Lemon <source@isc.org>
Tue, 6 Jul 1999 16:51:19 +0000 (16:51 +0000)
common/convert.c

index a1206648c8f74c8b86d2910b529cd72e26a5bd94..9f08f32e3fc98e8d6a07b1ceb8a7f32ab4c2974c 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: convert.c,v 1.8 1999/07/02 20:57:24 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: convert.c,v 1.9 1999/07/06 16:51:19 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -168,5 +168,11 @@ int binary_to_ascii (outbuf, inbuf, base, width)
                number /= base;
                power++;
        }
+
+       for (j = 0; j < i / 2; j++) {
+               unsigned char t = outbuf [j];
+               outbuf [j] = outbuf [i - j - 1];
+               outbuf [i - j - 1] = t;
+       }
        return power;
 }