qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/5] usb-linux.c: allow full-size control transf


From: Ian Jackson
Subject: Re: [Qemu-devel] [PATCH 1/5] usb-linux.c: allow full-size control transfers, do not overrun buffer
Date: Fri, 6 Feb 2009 10:35:15 +0000

malc writes ("Re: [Qemu-devel] [PATCH 1/5] usb-linux.c: allow full-size control 
transfers, do not overrun buffer"):
> On Tue, 3 Feb 2009, Ian Jackson wrote:
> > +#if defined(__linux__)
> 
> And endif is... (Leaving aside the fact that __linux__ guard in a file
> called something-linux.c is a weird looking thing)

I don't know how that got there.  It's a mistake.  Sorry.  I'll redo
the patch ...

> > +    assert(s->ctrl.len < sizeof(s->ctrl.buffer));
> > +
> 
> If something can happen it will, if assert can turn into a nop it will do
> so also, `if (cond) abort();' is more apropriate.

assert is used a lot on the rest of qemu so I assumed it was sensible
to use it here.  Anyone who compiles qemu with -DNDEBUG deserves what
they get, I think.

Ian.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]