Deduplicate error string patterns (#37676)
I wanted to see if moving moving out constant string arguments our of error messages results in smaller binary sizes. Turns out it does, but the savings are not consistent. Sometimes we get a few kB in a single binary, sometimes there is no size change.
This commit is contained in:
@@ -1930,7 +1930,7 @@ int vsock_get_local_cid(unsigned *ret) {
|
||||
|
||||
vsock_fd = open("/dev/vsock", O_RDONLY|O_CLOEXEC);
|
||||
if (vsock_fd < 0)
|
||||
return log_debug_errno(errno, "Failed to open /dev/vsock: %m");
|
||||
return log_debug_errno(errno, "Failed to open %s: %m", "/dev/vsock");
|
||||
|
||||
unsigned tmp;
|
||||
if (ioctl(vsock_fd, IOCTL_VM_SOCKETS_GET_LOCAL_CID, ret ?: &tmp) < 0)
|
||||
|
||||
Reference in New Issue
Block a user