Re: [PATCH v2] platform/x86: thinkpad_acpi: sysfs interface to auxmac

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

 



Hi,

On 9/15/23 18:18, Ilpo Järvinen wrote:
> On Fri, 15 Sep 2023, Fernando Eckhardt Valle wrote:

<snip>

>> +		goto auxmacinvalid;
>> +	}
>> +
>> +	if (strncmp(obj->string.pointer + 0x8, "#", 1) != 0 ||
>> +	    strncmp(obj->string.pointer + 0x15, "#", 1) != 0) {
> 
> Why use strncmp with (..., 1)? These offsets should defines above and not 
> use literals.

Right, good point.

To be extra clear here, this should be replaced by != '#' statements, e.g.:

	if (obj->string.pointer[AUXMAC_BEGIN_MARKER] != '#' ||
	    obj->string.pointer[AUXMAC_END_MARKER] != '#') {
		...

Regards,

Hans



_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel




[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux