[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/7] common/vsprintf: Refactor pointer() out of vsnprintf()
>>> On 04.11.13 at 22:30, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote: > No fuctional change functional > + str = number(str, end, val, 16, field_width, precision, flags); > + > + return str; Why not simply "return number(...);"? > @@ -399,13 +414,8 @@ int vsnprintf(char *buf, size_t size, const char *fmt, > va_list args) > continue; > > case 'p': > - if (field_width == -1) { > - field_width = 2*sizeof(void *); > - flags |= ZEROPAD; > - } > - str = number(str, end, > - (unsigned long) va_arg(args, void *), > - 16, field_width, precision, flags); > + str = pointer(str, end, (unsigned long) va_arg(args, void *), > + field_width, precision, flags); The va_arg() result clearly shouldn't be cast here, even if both the use here and that added by the next patch require this. I'm definitely planning on adding a modifier to print domain/vcpu IDs as a pair from a single "struct vcpu *" argument, and such code shouldn't be required to cast back from "unsigned long" to a pointer. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |