]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
chrt: fix compiler warning [-Wmaybe-uninitialized]
authorKarel Zak <kzak@redhat.com>
Tue, 20 Feb 2018 09:40:22 +0000 (10:40 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 20 Feb 2018 09:43:32 +0000 (10:43 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
schedutils/chrt.c

index 3d21c438705a86c7e38b6aad7aa9fe801aca705e..b08c78ed8ae90f7c6b8a0b3b1710736801b8724f 100644 (file)
@@ -207,7 +207,7 @@ static const char *get_policy_name(int policy)
 
 static void show_sched_pid_info(struct chrt_ctl *ctl, pid_t pid)
 {
-       int policy, reset_on_fork = 0, prio = 0;
+       int policy = -1, reset_on_fork = 0, prio = 0;
 #ifdef SCHED_DEADLINE
        uint64_t deadline = 0, runtime = 0, period = 0;
 #endif