From b43225eefb0e60858755d72103f9f9b53785b5d9 Mon Sep 17 00:00:00 2001 From: Tim Murray Date: Wed, 18 Nov 2015 16:42:44 -0800 Subject: [PATCH] Fix build break with uninitialized boost_fd. Change-Id: Icf209e2e0f4835db01f61dbf83b4715db9ef03a9 (cherry picked from commit def6c151f400b497c2a4f1f60b442358ea9a4209) --- libcutils/sched_policy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcutils/sched_policy.c b/libcutils/sched_policy.c index 54d112290..086b344c1 100644 --- a/libcutils/sched_policy.c +++ b/libcutils/sched_policy.c @@ -266,8 +266,8 @@ int set_cpuset_policy(int tid, SchedPolicy policy) policy = _policy(policy); pthread_once(&the_once, __initialize); - int fd; - int boost_fd; + int fd = -1; + int boost_fd = -1; switch (policy) { case SP_BACKGROUND: fd = bg_cpuset_fd;