Date: Mon, 03 Feb 2014 14:43:04 +0000 From: Robert Millan <rmh@freebsd.org> To: Baptiste Daroussin <bapt@FreeBSD.org> Cc: freebsd-x11@freebsd.org Subject: [PATCH] replace isnumber() with isdigit() in X devd backend Message-ID: <52EFAAF8.20009@freebsd.org>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
isdigit() is more correct in this case (the input is not locale-dependant),
and also more portable since it is provided on systems with Glibc (e.g.
Debian GNU/kFreeBSD).
--
Robert Millan
[-- Attachment #2 --]
=== modified file 'devd.c'
--- devd.c 2014-02-03 14:37:49 +0000
+++ devd.c 2014-02-03 14:39:38 +0000
@@ -206,7 +206,7 @@ device_added(char *line)
for (i = 0; hw_types[i].driver != NULL; i++) {
if (strncmp(line, hw_types[i].driver,
strlen(hw_types[i].driver)) == 0 &&
- isnumber(*(line + strlen(hw_types[i].driver)))) {
+ isdigit(*(line + strlen(hw_types[i].driver)))) {
#if XORG_VERSION_CURRENT > 10800000
attrs.flags |= hw_types[i].flag;
#endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52EFAAF8.20009>
