Message ID | 1272626035-14416-1-git-send-email-amit.shah@redhat.com |
---|---|
State | New |
Headers | show |
Amit Shah <amit.shah@redhat.com> wrote: > In the flush_queued_data() function, we expect port to be valid. Assert > only for port and not port || discard. > > Reported-by: Juan Quintela <quintela@redhat.com> > Signed-off-by: Amit Shah <amit.shah@redhat.com> reviewed-by: Juan Quintela <quintela@redhat.com> > --- > hw/virtio-serial-bus.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c > index 97694d5..3ce95e8 100644 > --- a/hw/virtio-serial-bus.c > +++ b/hw/virtio-serial-bus.c > @@ -137,7 +137,7 @@ static void do_flush_queued_data(VirtIOSerialPort *port, VirtQueue *vq, > > static void flush_queued_data(VirtIOSerialPort *port, bool discard) > { > - assert(port || discard); > + assert(port); > > do_flush_queued_data(port, port->ovq, &port->vser->vdev, discard); > }
On 04/30/2010 06:13 AM, Amit Shah wrote: > In the flush_queued_data() function, we expect port to be valid. Assert > only for port and not port || discard. > > Reported-by: Juan Quintela<quintela@redhat.com> > Signed-off-by: Amit Shah<amit.shah@redhat.com> > Applied. Thanks. Regards, Anthony Liguori > --- > hw/virtio-serial-bus.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c > index 97694d5..3ce95e8 100644 > --- a/hw/virtio-serial-bus.c > +++ b/hw/virtio-serial-bus.c > @@ -137,7 +137,7 @@ static void do_flush_queued_data(VirtIOSerialPort *port, VirtQueue *vq, > > static void flush_queued_data(VirtIOSerialPort *port, bool discard) > { > - assert(port || discard); > + assert(port); > > do_flush_queued_data(port, port->ovq,&port->vser->vdev, discard); > } >
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 97694d5..3ce95e8 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial-bus.c @@ -137,7 +137,7 @@ static void do_flush_queued_data(VirtIOSerialPort *port, VirtQueue *vq, static void flush_queued_data(VirtIOSerialPort *port, bool discard) { - assert(port || discard); + assert(port); do_flush_queued_data(port, port->ovq, &port->vser->vdev, discard); }
In the flush_queued_data() function, we expect port to be valid. Assert only for port and not port || discard. Reported-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> --- hw/virtio-serial-bus.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)