[Intel-gfx] [PATCH i-g-t] igt/drv_hangman: Fix clear_error_state

Michel Thierry michel.thierry at intel.com
Thu Feb 23 02:06:22 UTC 2017



On 22/02/17 18:04, Chris Wilson wrote:
> On Thu, Feb 23, 2017 at 01:52:04AM +0000, Chris Wilson wrote:
>> On Wed, Feb 22, 2017 at 05:26:29PM -0800, Michel Thierry wrote:
>>>  static void clear_error_state(void)
>>>  {
>>> -	igt_sysfs_set(sysfs, "error", "");
>>> +	igt_sysfs_set(sysfs, "error", " ");
>>
>> My bad, I was expecting it write the nul character. "\0" would be my
>> preference
>
> Still needs an explicit igt_sysfs_write() to avoid strlen.
> -Chris
>

Yes, strlen(\0) is 0, which at the end is write(x, 0) and ignored.


More information about the Intel-gfx mailing list