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