From c207a572275f7645673727b5406b3449d35da99f Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 19 Feb 2023 07:15:02 +0900 Subject: [PATCH] udev-node: drop unnecessary initialization The priority of device node symlink can be negative. So the initialization is confusing. Fortunately, this changes no functionality, as we only compare the priorities of symlinks only when we parsed at least one device node and its priority. --- src/udev/udev-node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c index 1596497da89..5f3dc61f09f 100644 --- a/src/udev/udev-node.c +++ b/src/udev/udev-node.c @@ -181,7 +181,7 @@ static int stack_directory_read_one(int dirfd, const char *id, char **devnode, i static int stack_directory_find_prioritized_devnode(sd_device *dev, int dirfd, bool add, char **ret) { _cleanup_closedir_ DIR *dir = NULL; _cleanup_free_ char *devnode = NULL; - int r, priority = 0; + int r, priority; const char *id; assert(dev); -- 2.47.3