acpi NamespaceDump: "unsigned <= 0" comparison, better check of byte length
This commit is contained in:
parent
81b134d33c
commit
cc9a637eb0
@ -149,11 +149,11 @@ dump_acpi_namespace(acpi_ns_device_info *device, char *root, int indenting)
|
||||
RingBuffer &ringBuffer = *device->buffer;
|
||||
size_t toWrite = strlen(output);
|
||||
|
||||
if (toWrite <= 0)
|
||||
if (toWrite == 0)
|
||||
break;
|
||||
|
||||
strlcat(output, "\n", sizeof(output));
|
||||
toWrite++;
|
||||
toWrite = strlcat(output, "\n", sizeof(output));
|
||||
|
||||
if (!ringBuffer.Lock())
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user