bsod: do not use STRLEN

The compiler optimizes strlen away, so we can use the simplest form that is
type safe and more natural. STRLEN is only for array initialization.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2024-01-30 10:11:07 +01:00
parent 534fc25ad9
commit e1054a8bcd
+1 -1
View File
@@ -103,7 +103,7 @@ static int acquire_first_emergency_log_message(char **ret) {
if (r < 0)
return log_error_errno(r, "Failed to read journal message: %m");
message = memdup_suffix0((const char*)d + STRLEN("MESSAGE="), l - STRLEN("MESSAGE="));
message = memdup_suffix0((const char*)d + strlen("MESSAGE="), l - strlen("MESSAGE="));
if (!message)
return log_oom();