Mailing List Archive

A little bug is found!
Hi,

It's a small mistake of function call in line 202 of file serial.c,
in the function "ttylock". The parameters are in wrong place while
calling function "sscanf", it should be:
sscanf(buf, "%d", &pid),
not:
sscanf("%d", buf, &pid).

In the wrong case, sscanf always return failed.

Yours, Cliff
A little bug is found! [ In reply to ]
Qiming Liang wrote:
>
> Hi,
>
> It's a small mistake of function call in line 202 of file serial.c,
> in the function "ttylock". The parameters are in wrong place while
> calling function "sscanf", it should be:
> sscanf(buf, "%d", &pid),
> not:
> sscanf("%d", buf, &pid).
>
> In the wrong case, sscanf always return failed.

You're absolutely right. I've just fixed it under CVS.

Did this fix your problem, or did you just find it coincidentally?

Thanks!

-- Alan Robertson
alanr@unix.sh