[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] inet_listen_opts: add error checking
From: |
Gonglei (Arei) |
Subject: |
Re: [Qemu-devel] [PATCH] inet_listen_opts: add error checking |
Date: |
Thu, 22 May 2014 06:10:55 +0000 |
> -----Original Message-----
> From: Gerd Hoffmann [mailto:address@hidden
> Sent: Thursday, May 22, 2014 1:44 PM
> To: Gonglei (Arei)
> Cc: address@hidden
> Subject: Re: [Qemu-devel] [PATCH] inet_listen_opts: add error checking
>
> > > /* lookup */
> > > - if (port_offset)
> > > - snprintf(port, sizeof(port), "%d", atoi(port) + port_offset);
> > > + if (port_offset) {
> > > + unsigned long long baseport;
> >
> > unsigned long long is not necessary, unsigned long is enough.
> >
> > > + if (parse_uint_full(port, &baseport, 10) < 0) {
>
> parse_uint_full prototype uses "unsigned long long". And on 32bit
> machines it actually is a difference (long long is 64bit integer whereas
> long is 32bit only).
>
Okay, Thanks.
Best regards,
-Gonglei