On Thu, Jul 06, 2017 at 09:57:27AM +0800, JingPiao Chen wrote: > * tests/print_quoted_string.c (print_quoted_memory): Add > quotation marks printer. > * tests/getcwd.c (main): Remove quotation marks printer. > * tests/keyctl.c (print_quoted_string_limit): Likewise. > * tests/netlink_protocol.c (send_query): Likewise. > * tests/uname.c (main): Likewise. > * tests/xattr.c (main): Likewise. [...] > diff --git a/tests/print_quoted_string.c b/tests/print_quoted_string.c > index 732fe3d..6fc0d16 100644 > --- a/tests/print_quoted_string.c > +++ b/tests/print_quoted_string.c > @@ -21,6 +21,7 @@ print_quoted_memory(const char *instr, const size_t len) > const unsigned char *str = (const unsigned char *) instr; > size_t i; > > + printf("\""); > for (i = 0; i < len; ++i) { > const int c = str[i]; > switch (c) { > @@ -72,4 +73,5 @@ print_quoted_memory(const char *instr, const size_t len) > } > } > > + printf("\""); > } [...] > diff --git a/tests/xattr.c b/tests/xattr.c > index 03b4270..fea9e92 100644 > --- a/tests/xattr.c > +++ b/tests/xattr.c > @@ -112,9 +112,7 @@ main(void) > else { > const int ellipsis = rc > DEFAULT_STRLEN; > > - putchar('"'); > print_quoted_memory(big, ellipsis ? DEFAULT_STRLEN : rc); > - putchar('"'); > if (ellipsis) > fputs("...", stdout); > }
I'm slightly in favour of putchar('"') over printf("\"") nowadays. -- ldv
signature.asc
Description: PGP signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel