From f6f1356f1c633e65413d13be927fe1e56e8515be Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 3 Jul 2016 12:18:03 +0100 Subject: [PATCH] dmesg: drop core at impossible case in read_buffer() [oclint] Signed-off-by: Sami Kerola --- sys-utils/dmesg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index 4544388427..92de6e26fd 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -591,6 +591,8 @@ static ssize_t read_buffer(struct dmesg_control *ctl, char **buf) if (n == 0 && ctl->action == SYSLOG_ACTION_READ_CLEAR) n = klogctl(SYSLOG_ACTION_CLEAR, NULL, 0); break; + default: + abort(); /* impossible method -> drop core */ } return n; -- 2.47.2