hal/hald/linux2/probing probe-smbios.c,1.9,1.10

Danny Kukawka dkukawka at kemper.freedesktop.org
Tue May 9 13:31:32 PDT 2006


Update of /cvs/hal/hal/hald/linux2/probing
In directory kemper:/tmp/cvs-serv28090/hald/linux2/probing

Modified Files:
	probe-smbios.c 
Log Message:
2006-05-09  Danny Kukawka  <danny.kukawka at web.de>

        * hald/linux2/probing/probe-smbios.c: fixed problem with parse
        information from output of dmidecode where the search string is
        shorter than 7 chars: replaced in strbegin() 'sizeof(char *) -1'
        (which returns the size of the pointer) with 'strlen(char *)' which
        returns the size of the string.



Index: probe-smbios.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/probing/probe-smbios.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- probe-smbios.c	12 Jan 2006 17:48:44 -0000	1.9
+++ probe-smbios.c	9 May 2006 20:31:30 -0000	1.10
@@ -45,7 +45,7 @@
 #define DMIPARSER_STATE_SYSTEM		2
 #define DMIPARSER_STATE_CHASSIS		3
 
-#define strbegin(buf, str) (strncmp (buf, str, sizeof (str) - 1) == 0)
+#define strbegin(buf, str) (strncmp (buf, str, strlen (str)) == 0)
 
 /* global */
 char *udi = NULL;




More information about the hal-commit mailing list