All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>, Wei Liu <wl@xen.org>,
	Anthony PERARD <anthony.perard@citrix.com>
Subject: [PATCH 3/4] tools/libs/guest: don't set errno to a negative value
Date: Wed, 20 Apr 2022 09:31:18 +0200	[thread overview]
Message-ID: <20220420073119.16974-4-jgross@suse.com> (raw)
In-Reply-To: <20220420073119.16974-1-jgross@suse.com>

Setting errno to a negative error value makes no sense.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 tools/libs/guest/xg_dom_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libs/guest/xg_dom_core.c b/tools/libs/guest/xg_dom_core.c
index c17cf9f712..c4f4e7f3e2 100644
--- a/tools/libs/guest/xg_dom_core.c
+++ b/tools/libs/guest/xg_dom_core.c
@@ -855,7 +855,7 @@ int xc_dom_devicetree_file(struct xc_dom_image *dom, const char *filename)
         return -1;
     return 0;
 #else
-    errno = -EINVAL;
+    errno = EINVAL;
     return -1;
 #endif
 }
-- 
2.34.1



  parent reply	other threads:[~2022-04-20  7:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  7:31 [PATCH 0/4] tools/libs: don't set errno to negative values Juergen Gross
2022-04-20  7:31 ` [PATCH 1/4] tools/libs/evtchn: " Juergen Gross
2022-04-22 14:44   ` Andrew Cooper
2022-04-20  7:31 ` [PATCH 2/4] tools/libs/ctrl: don't set errno to a negative value Juergen Gross
2022-04-22 14:47   ` Andrew Cooper
2022-04-20  7:31 ` Juergen Gross [this message]
2022-04-22 14:49   ` [PATCH 3/4] tools/libs/guest: " Andrew Cooper
2022-04-20  7:31 ` [PATCH 4/4] tools/libs/light: " Juergen Gross
2022-04-22 14:52   ` Andrew Cooper
2022-04-22 14:55     ` Juergen Gross
2022-04-22 14:59       ` Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220420073119.16974-4-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=anthony.perard@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.