From 78715f65c92a8892960e2a5fce945496939f8599 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 8 Sep 2009 22:11:04 +0200 Subject: fix randonm findings from llvm-clang-analyzer Thanks to Lennart for the log file! --- udev/udev-rules.c | 2 +- udev/udevadm-info.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'udev') diff --git a/udev/udev-rules.c b/udev/udev-rules.c index bc224040d2..a85800adf2 100644 --- a/udev/udev-rules.c +++ b/udev/udev-rules.c @@ -1127,7 +1127,7 @@ static int sort_token(struct udev_rules *rules, struct rule_tmp *rule_tmp) for (i = 0; i < rule_tmp->token_cur; i++) { enum token_type next_val = TK_UNSET; - unsigned int next_idx; + unsigned int next_idx = 0; unsigned int j; /* find smallest value */ diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c index 519dc4a45b..d95091c4a4 100644 --- a/udev/udevadm-info.c +++ b/udev/udevadm-info.c @@ -60,7 +60,7 @@ static void print_all_attributes(struct udev_device *device, const char *key) value = udev_device_get_sysattr_value(device, dent->d_name); if (value == NULL) continue; - dbg(udev, "attr '%s'='%s'(%zi)\n", dent->d_name, value, len); + dbg(udev, "attr '%s'='%s'\n", dent->d_name, value); /* skip nonprintable attributes */ len = strlen(value); -- cgit v1.2.3-54-g00ecf