From: Yuanchao Sun <yuanchaosun@gmail.com>
To: wireguard@lists.zx2c4.com
Subject: [PATCH 1/1] tools: remove '\n' in fscanf format-string
Date: Tue, 28 Nov 2017 15:49:47 +0800 [thread overview]
Message-ID: <20171128074947.2212-2-yuanchao.sun@gmail.com> (raw)
In-Reply-To: <20171128074947.2212-1-yuanchao.sun@gmail.com>
---
src/tools/ipc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tools/ipc.c b/src/tools/ipc.c
index a88672f..7264848 100644
--- a/src/tools/ipc.c
+++ b/src/tools/ipc.c
@@ -271,7 +271,7 @@ static int userspace_set_device(struct wgdevice *dev)
fprintf(f, "\n");
fflush(f);
- if (fscanf(f, "errno=%d\n\n", &ret) != 1)
+ if (fscanf(f, "errno=%d", &ret) != 1)
ret = errno ? -errno : -EPROTO;
fclose(f);
errno = -ret;
--
2.15.0
next prev parent reply other threads:[~2017-11-28 7:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 7:49 [PATCH 0/1] " Yuanchao Sun
2017-11-28 7:49 ` Yuanchao Sun [this message]
2017-11-28 11:03 ` [PATCH 1/1] tools: " Jason A. Donenfeld
2017-11-28 14:53 ` Yuanchao Sun
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=20171128074947.2212-2-yuanchao.sun@gmail.com \
--to=yuanchaosun@gmail.com \
--cc=wireguard@lists.zx2c4.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).