Commit 36cb7287 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Rafael J. Wysocki
Browse files

ACPI: processor: idle: Replace strlcat() with better alternative



strlcpy() and strlcat() are confusing APIs and the former one already
gone from the kernel.

In preparation to kill strlcat() replace it with the better alternative.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260317080218.1814693-1-andriy.shevchenko@linux.intel.com


Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 4d613fb1
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1010,9 +1010,7 @@ static bool combine_lpi_states(struct acpi_lpi_state *local,
	result->arch_flags = parent->arch_flags;
	result->index = parent->index;

	strscpy(result->desc, local->desc, ACPI_CX_DESC_LEN);
	strlcat(result->desc, "+", ACPI_CX_DESC_LEN);
	strlcat(result->desc, parent->desc, ACPI_CX_DESC_LEN);
	scnprintf(result->desc, ACPI_CX_DESC_LEN, "%s+%s", local->desc, parent->desc);
	return true;
}