am 958af99e: am 42997bfe: am eb809351: Merge "Always unlink /dev/__kmsg__."
* commit '958af99e0e26af7267828020b73903a054855525':
Always unlink /dev/__kmsg__.
diff --git a/libcutils/klog.c b/libcutils/klog.c
index fad2a8b..f574f08 100644
--- a/libcutils/klog.c
+++ b/libcutils/klog.c
@@ -40,12 +40,9 @@
void klog_init(void) {
if (klog_fd >= 0) return; /* Already initialized */
- static const char *name = "/dev/__kmsg__";
+ static const char* name = "/dev/__kmsg__";
if (mknod(name, S_IFCHR | 0600, (1 << 8) | 11) == 0) {
klog_fd = open(name, O_WRONLY | O_CLOEXEC);
- if (klog_fd == -1) {
- return;
- }
unlink(name);
}
}