]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
uuidd: use sizeof_member
authorThomas Weißschuh <thomas@t-8ch.de>
Sat, 21 Jan 2023 00:52:49 +0000 (00:52 +0000)
committerThomas Weißschuh <thomas@t-8ch.de>
Sat, 21 Jan 2023 00:52:49 +0000 (00:52 +0000)
misc-utils/uuidd.c

index 18fbbb652ab13f9d36c38f10387debfc77daae85..db8b0c789dbf190a8a417f91d73971d651c78f84 100644 (file)
@@ -725,7 +725,7 @@ int main(int argc, char **argv)
 
        parse_options(argc, argv, &uuidd_cxt, &uuidd_opts);
 
-       if (strlen(uuidd_opts.socket_path) >= sizeof(((struct sockaddr_un *)0)->sun_path))
+       if (strlen(uuidd_opts.socket_path) >= sizeof_member(struct sockaddr_un, sun_path))
                errx(EXIT_FAILURE, _("socket name too long: %s"), uuidd_opts.socket_path);
 
        if (!uuidd_opts.no_pid && !uuidd_opts.pidfile_path)