5 Commits

Author SHA1 Message Date
Eugene Syromyatnikov
0b803f8edd Use xappendstr instead of xsnprintf where suitable
Replace occurrences of

    outptr += xsnprintf(outptr, sizeof(outstr) - (outptr - outstr), ...)

with much more sleek

    outptr = xappendstr(outstr, outptr, ...)

* desc.c (decode_select): Replace xsnprintf with xappendstr.
* open.c (sprint_open_modes): Likewise.
* poll.c (decode_poll_exiting): Likewise.
* signal.c (sprintsigmask_n): Likewise.
* xlat.c (sprintflags): Likewise.
2018-01-11 15:54:33 +00:00
Eugene Syromiatnikov
a907f4a126 xlat.c: add sprintxval for printing xval to string
* defs.h (sprintxval): New declaration.
(sprintxval): New function.
2018-01-07 00:05:42 +00:00
6e67a2b71e xlat.c: use xsnprintf instead of sprintf
* xlat.c: Include "xstring.h".
(sprintflags): Replace sprintf with xsnprintf.
2018-01-07 00:05:42 +00:00
184e94ba05 Fix a few spacing style issues
Reported by kernel's checkpatch.pl script.
2017-06-17 22:54:08 +00:00
88a34fa6da Move xlat related functions to a separate file
* util.c (xlookup, xlat_bsearch_compare, xlat_search, printxvals,
printxval_searchn, addflags, sprintflags, printflags_ex): Move ...
* xlat.c: ... to this new file.
* Makefile.am (strace_SOURCES): Add it.
2017-06-12 16:44:45 +00:00