Re: [Xen-devel] [PATCH] vsprintf: Make sure argument to %*ph/%pv is valid

2015-02-11 Thread Jan Beulich
>>> On 10.02.15 at 22:49, wrote: > On 10/02/2015 21:44, Boris Ostrovsky wrote: >> If NULL pointer is passed for these specifiers then print '-' >> or 'd-v-'. >> >> Signed-off-by: Boris Ostrovsky > > Instead of special casing each custom format, I would be tempted just to > put the switch() in an

Re: [Xen-devel] [PATCH] vsprintf: Make sure argument to %*ph/%pv is valid

2015-02-10 Thread Boris Ostrovsky
On 02/10/2015 04:49 PM, Andrew Cooper wrote: On 10/02/2015 21:44, Boris Ostrovsky wrote: If NULL pointer is passed for these specifiers then print '-' or 'd-v-'. Signed-off-by: Boris Ostrovsky Instead of special casing each custom format, I would be tempted just to put the switch() in an if(a

Re: [Xen-devel] [PATCH] vsprintf: Make sure argument to %*ph/%pv is valid

2015-02-10 Thread Andrew Cooper
On 10/02/2015 21:44, Boris Ostrovsky wrote: > If NULL pointer is passed for these specifiers then print '-' > or 'd-v-'. > > Signed-off-by: Boris Ostrovsky Instead of special casing each custom format, I would be tempted just to put the switch() in an if(arg) conditional, and fall back to the reg

[Xen-devel] [PATCH] vsprintf: Make sure argument to %*ph/%pv is valid

2015-02-10 Thread Boris Ostrovsky
If NULL pointer is passed for these specifiers then print '-' or 'd-v-'. Signed-off-by: Boris Ostrovsky --- xen/common/vsprintf.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/xen/common/vsprintf.c b/xen/common/vsprintf.c index 065cc42..84cfa85 10064