summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-09-08 22:11:04 +0200
committerKay Sievers <kay.sievers@vrfy.org>2009-09-08 22:11:04 +0200
commit78715f65c92a8892960e2a5fce945496939f8599 (patch)
treed18981188262514cf5be98702f4cd8bf3b5b39f1 /udev
parent04d4a6f85863552eaedc61cfeef5681776c8bb38 (diff)
fix randonm findings from llvm-clang-analyzer
Thanks to Lennart for the log file!
Diffstat (limited to 'udev')
-rw-r--r--udev/udev-rules.c2
-rw-r--r--udev/udevadm-info.c2
2 files changed, 2 insertions, 2 deletions
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);