[CRIU] [PATCH] net/ip: print fd link of the image we fail to restore from

Dmitry Safonov 0x7f454c46 at gmail.com
Tue Aug 7 16:58:10 MSK 2018


2018-08-07 13:52 GMT+01:00 Pavel Tikhomirov <ptikhomirov at virtuozzo.com>:
[..]
>                         pr_err("IP tool failed on %s %s %s %s\n", arg1, arg2, arg3 ? : "\0", arg4 ? : "\0");

Minor nit:
"\0" is a string with *two* null-terminates, so you could use just "".
BTW, I believe, printf() is smart enough to not dereference null-ptr
from %s. But that force comes with the price of "(null)" printed, IIRC.
If it's ok - this code line is prettier :)

-- 
             Dmitry


More information about the CRIU mailing list