From: Ted Lemon Date: Tue, 6 Jul 1999 16:51:19 +0000 (+0000) Subject: Reverse output of conversion routine. X-Git-Tag: V3-BETA-1-PATCH-0~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c80312f3f6f202134699c90c551488f59c67016;p=thirdparty%2Fdhcp.git Reverse output of conversion routine. --- diff --git a/common/convert.c b/common/convert.c index a1206648c..9f08f32e3 100644 --- a/common/convert.c +++ b/common/convert.c @@ -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; }