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

Yuanchao Sun yuanchaosun at gmail.com
Tue Nov 28 15:53:54 CET 2017


Hi Jason,

> Thanks for the patch. In the future, please include your Signed-off-by
> line and include the explanation in the body of the commit where it
> will be recorded in the future.

Sure. This is my first time using git send-email ... I just followed the steps
from a quick guide. I will figure out how to add the Signed-off-by line
the next time.

> 
> I'm not sure this patch is correct. The /xplatform spec mandates an
> empty line. This patch enforces that. What is the purpose of removing
> that requirement?
> 
> Also, I'm curious to learn what you're doing with this API at this early stage.

I'm trying to implement a userspace client using rust (does not work properly
for now ;/ ).

But I found fscanf does not return after reading a complete response (b"errno=0\n\n").
After searching, it seems '\n' in format string does not mean newline but any whitespaces.
fscanf hangs until a extra non-whitespace character.
So I fix this problem by removing the trailing '\n's in format string.

Yuanchao



More information about the WireGuard mailing list