Patchwork slirp: Fix typo in net_slirp_hostfwd_remove

login
register
mail settings
Submitter Geoffrey Thomas
Date Dec. 17, 2011, 9:23 a.m.
Message ID <alpine.DEB.2.02.1112170420460.22177@tyger.mit.edu>
Download mbox | patch
Permalink /patch/131990/
State New
Headers show

Comments

Geoffrey Thomas - Dec. 17, 2011, 9:23 a.m.
Report an error when err is nonzero, not when it is zero.

Signed-off-by: Geoffrey Thomas <geofft@ldpreload.com>
---
  net/slirp.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
Jan Kiszka - Dec. 17, 2011, 7:52 p.m.
On 2011-12-17 10:23, Geoffrey Thomas wrote:
> Report an error when err is nonzero, not when it is zero.
> 
> Signed-off-by: Geoffrey Thomas <geofft@ldpreload.com>
> ---
>  net/slirp.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/slirp.c b/net/slirp.c
> index 6646ecb..18e07ba 100644
> --- a/net/slirp.c
> +++ b/net/slirp.c
> @@ -351,7 +351,7 @@ void net_slirp_hostfwd_remove(Monitor *mon, const
> QDict *qdict)
>                                 host_addr, host_port);
> 
>      monitor_printf(mon, "host forwarding rule for %s %s\n", src_str,
> -                   err ? "removed" : "not found");
> +                   err ? "not found" : "removed");
>      return;
> 
>   fail_syntax:

Oops, obviously. Stefan, should be another trivial one for you.

Thanks,
Jan
Stefan Hajnoczi - Dec. 19, 2011, 10:48 a.m.
On Sat, Dec 17, 2011 at 04:23:59AM -0500, Geoffrey Thomas wrote:
> Report an error when err is nonzero, not when it is zero.
> 
> Signed-off-by: Geoffrey Thomas <geofft@ldpreload.com>
> ---
>  net/slirp.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Thanks, applied to the trivial patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches

Stefan

Patch

diff --git a/net/slirp.c b/net/slirp.c
index 6646ecb..18e07ba 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -351,7 +351,7 @@  void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict)
                                 host_addr, host_port);

      monitor_printf(mon, "host forwarding rule for %s %s\n", src_str,
-                   err ? "removed" : "not found");
+                   err ? "not found" : "removed");
      return;

   fail_syntax: