diff options
author | Elliott Hughes <enh@google.com> | 2015-03-28 17:57:45 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-03-28 17:57:46 +0000 |
commit | 6dbbcc57a00e6b44488e595d128e27168a939a02 (patch) | |
tree | 59fabcbe52eff54730c9448b3f3f6e8b205adcc2 | |
parent | 5db3936dbe6fa73d45ab0f02b7166f43680084d3 (diff) | |
parent | 747383649c28198457aa2cbb5b93743fac837f06 (diff) | |
download | system_core-6dbbcc57a00e6b44488e595d128e27168a939a02.zip system_core-6dbbcc57a00e6b44488e595d128e27168a939a02.tar.gz system_core-6dbbcc57a00e6b44488e595d128e27168a939a02.tar.bz2 |
Merge "Fix clang build by removing unused locals."
-rw-r--r-- | init/devices.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/init/devices.cpp b/init/devices.cpp index c32eb4f..1fa70ec 100644 --- a/init/devices.cpp +++ b/init/devices.cpp @@ -983,12 +983,7 @@ static void coldboot(const char *path) } } -void device_init(void) -{ - suseconds_t t0, t1; - struct stat info; - int fd; - +void device_init() { sehandle = NULL; if (is_selinux_enabled() > 0) { sehandle = selinux_android_file_context_handle(); @@ -1000,16 +995,15 @@ void device_init(void) if(device_fd < 0) return; - fcntl(device_fd, F_SETFD, FD_CLOEXEC); fcntl(device_fd, F_SETFL, O_NONBLOCK); + struct stat info; if (stat(COLDBOOT_DONE, &info) < 0) { Timer t; coldboot("/sys/class"); coldboot("/sys/block"); coldboot("/sys/devices"); - fd = open(COLDBOOT_DONE, O_WRONLY|O_CREAT|O_CLOEXEC, 0000); - close(fd); + close(open(COLDBOOT_DONE, O_WRONLY|O_CREAT|O_CLOEXEC, 0000)); NOTICE("Coldboot took %.2fs.\n", t.duration()); } else { NOTICE("Skipping coldboot, already done!\n"); |