Date: Sun, 23 Nov 2008 04:16:15 GMT From: Garrett Cooper <gcooper@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/129078: Bug in hexsyntax.c:new_syntax -- literal instead of escaped newline used Message-ID: <200811230416.mAN4GFdu065664@www.freebsd.org> Resent-Message-ID: <200811230420.mAN4K1mg043128@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 129078 >Category: misc >Synopsis: Bug in hexsyntax.c:new_syntax -- literal instead of escaped newline used >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 23 04:20:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: 8-CURRENT >Organization: n/a >Environment: FreeBSD optimus.gateway.2wire.net 8.0-CURRENT FreeBSD 8.0-CURRENT #5: Thu Nov 20 23:31:07 PST 2008 gcooper@optimus.gateway.2wire.net:/usr/obj/usr/src/sys/OPTIMUS amd64 >Description: Found this minor typo bug while trying to correct the other PR's assigned to me related to hexdump. At first glance it doesn't appear to fix anything, but I could be wrong. >How-To-Repeat: Unsure. >Fix: Patch attached with submission follows: Index: hexsyntax.c =================================================================== --- hexsyntax.c (revision 185157) +++ hexsyntax.c (working copy) @@ -65,7 +65,8 @@ add("\"%08.8_ax \" 8/1 \"%02x \" \" \" 8/1 \"%02x \" "); add("\" |\" 16/1 \"%_p\" \"|\\n\""); } - while ((ch = getopt(argc, argv, "bcCde:f:n:os:vx")) != -1) + while ((ch = getopt(argc, argv, "bcCde:f:n:os:vx")) != -1) { + switch (ch) { case 'b': add("\"%07.7_Ax\n\""); @@ -124,8 +125,10 @@ usage(); } + } + if (!fshead) { - add("\"%07.7_Ax\n\""); + add("\"%07.7_Ax\\n\""); add("\"%07.7_ax \" 8/2 \"%04x \" \"\\n\""); } >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811230416.mAN4GFdu065664>