]> granicus.if.org Git - strace/commit
xlat: handle NULL str in print_xlat_ex
authorEugene Syromyatnikov <evgsyr@gmail.com>
Wed, 4 Apr 2018 11:29:58 +0000 (13:29 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 27 Apr 2018 00:56:25 +0000 (00:56 +0000)
commit69b958656e22c8b3fdb4f4ea3e07a7b5cd608d3d
tree563fc6c77cf608ec2a66f397f51668e612fca7b1
parent5120473370ab103542231ed13f891edc61b64306
xlat: handle NULL str in print_xlat_ex

It allows to use the following code pattern:

print_xlat_ex(val, xlookup(xlat, val), XLAT_STYLE_FMT_D);

* xlat.c (print_xlat_ex): Handle str being NULL: print val instead.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
xlat.c