This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
[Patch] fhandler.cc: Don't worry about SPC in __small_printf-format
- From: Bas van Gompel <cygwin-patches dot buzz at bavag dot tmfweb dot nl>
- To: cygwin-patches at cygwin dot com
- Date: Sun, 5 Dec 2004 05:44:24 +0100 (MET)
- Subject: [Patch] fhandler.cc: Don't worry about SPC in __small_printf-format
- Organisation: Ehm...
- Reply-to: cygwin-patches mailing-list <cygwin-patches at cygwin dot com>
Hi,
Three lines up from the previous patch there is a check to decide which
format to use. This is not needed, an equivalent test is already done in
__small_vsprintf.
(Trivial) patch follows.
ChangeLog-entry:
2004-12-05 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
* fhandler.cc (fhandler_base::read): Remove superfluous check in
__small_sprintf format for strace.
--- src/winsup/cygwin/fhandler.cc 5 Dec 2004 01:53:47 -0000 1.208
+++ src/winsup/cygwin/fhandler.cc 5 Dec 2004 04:13:08 -0000
@@ -754,8 +754,7 @@ fhandler_base::read (void *in_ptr, size_
for (int i = 0; i < copied_chars && i < 16; ++i)
{
unsigned char c = ((unsigned char *) ptr)[i];
- /* >= 33 so space prints in hex */
- __small_sprintf (p, c >= 33 && c <= 127 ? " %c" : " %p", c);
+ __small_sprintf (p, " %c", c);
p += strlen (p);
}
*p = '\0';
L8r,
Buzz.
--
) | | ---/ ---/ Yes, this | This message consists of true | I do not
-- | | / / really is | and false bits entirely. | mail for
) | | / / a 72 by 4 +-------------------------------+ any1 but
-- \--| /--- /--- .sigfile. | |perl -pe "s.u(z)\1.as." | me. 4^re