DragonFly BSD
DragonFly kernel List (threaded) for 2005-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: sasc re-write


From: Diane Bruce <db@xxxxxx>
Date: Mon, 17 Jan 2005 10:20:49 -0500

On Mon, Jan 17, 2005 at 09:24:53AM +0100, Simon 'corecode' Schubert wrote:
> hey, just a few comments
>
. ..

And a nit...

> >+        val = strtol(str, &ep, 10);
> >+        if (errno)
> >+                err(1, "strtol failed: %s", str);


I'd not attempt to use errno as a boolean, I'd do:

if (errno != 0)
	...

Especially as later on you do:

>+      if (ioctl(fd, asc_setting, &asc_value) < 0)

> you don't reset errno to 0, so this might be not working. reading the
> man page it might be needed :/

Indeed it would be.

- Diane.



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]