[PATCH 1/1] tools: remove '\n' in fscanf format-string

Yuanchao Sun yuanchaosun at gmail.com
Tue Nov 28 08:49:47 CET 2017


---
 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



More information about the WireGuard mailing list