]> granicus.if.org Git - strace/commit
Change umovestr API: return > 0 instead of 0 if NUL was seen
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 20 Jan 2012 10:56:00 +0000 (11:56 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 20 Jan 2012 10:56:00 +0000 (11:56 +0100)
commit6cecba53225ae30f1a28ce6954fb0cda847f3688
tree3ddf331b542e8645751e6de0c1bb5246a044b046
parenta17e55ca8f6f3d9897d891215405715b1bee5131
Change umovestr API: return > 0 instead of 0 if NUL was seen

* pathtrace.c (upathmatch): Adjust umovestr return value check for new API.
* util.c (printpathn): Use umovestr() > 0 return value for more efficient
(and robust - we don't depend on "no overwrote past NUL" behavior anymore)
handling of terminating NUL.
(printstr): Remove useless NUL placement before umovestr() call.
Allocate 1 byte more to outstr[] array - for NUL.
(umovestr): Change to return 1 if NUL was seen.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
pathtrace.c
util.c