On 18 October 2010 10:00, Alex Murray <murray.a...@gmail.com> wrote:
> See attached patch - basically if the kbd backlight is zero at startup
> upower will currently fail to detect it since it sees a value of 0 as
> an error - instead don't bother to check for error since
> g_ascii_strtoll returns 0 as both error and a valid conversion of 0.

Look at the docs for g_ascii_strtoull -- there's a way to detect if
parsing failed by comparing the two pointers. I think that's a much
better fix.

Richard.
_______________________________________________
devkit-devel mailing list
devkit-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/devkit-devel

Reply via email to