From owner-freebsd-x11@FreeBSD.ORG Mon Feb 3 14:43:07 2014 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7176ED67; Mon, 3 Feb 2014 14:43:07 +0000 (UTC) Received: from master.debian.org (master.debian.org [IPv6:2001:41b8:202:deb:216:36ff:fe40:4001]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 372E71FC6; Mon, 3 Feb 2014 14:43:07 +0000 (UTC) Received: from localhost ([::1]) by master.debian.org with esmtp (Exim 4.80) (envelope-from ) id 1WAKjp-0002K5-Na; Mon, 03 Feb 2014 14:43:05 +0000 Message-ID: <52EFAAF8.20009@freebsd.org> Date: Mon, 03 Feb 2014 14:43:04 +0000 From: Robert Millan User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Baptiste Daroussin Subject: [PATCH] replace isnumber() with isdigit() in X devd backend X-Enigmail-Version: 1.6 Content-Type: multipart/mixed; boundary="------------050706020100080101070904" Cc: freebsd-x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Feb 2014 14:43:07 -0000 This is a multi-part message in MIME format. --------------050706020100080101070904 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --------------050706020100080101070904 Content-Type: text/x-patch; name="devd_isdigit.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="devd_isdigit.diff" === 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 --------------050706020100080101070904--