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:
+1
-1
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user