Blob Blame History Raw
From 8e94781169fc2f36eb49078de1978ceb53df6b6c Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Mon, 15 Apr 2019 17:40:26 +0200
Subject: [PATCH] Refactor: sbd-common: no reason for stack-hogger having
 retval

---
 src/sbd-common.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/sbd-common.c b/src/sbd-common.c
index 3966f25..873a76e 100644
--- a/src/sbd-common.c
+++ b/src/sbd-common.c
@@ -568,13 +568,13 @@ enum {
 #define IOPRIO_PRIO_DATA(mask)  ((mask) & IOPRIO_PRIO_MASK)
 #define IOPRIO_PRIO_VALUE(class, data)  (((class) << IOPRIO_CLASS_SHIFT) | data)
 
-static unsigned char
+static void
 sbd_stack_hogger(unsigned char * inbuf, int kbytes)
 {
     unsigned char buf[1024];
 
     if(kbytes <= 0) {
-        return HOG_CHAR;
+        return;
     }
 
     if (inbuf == NULL) {
@@ -584,10 +584,10 @@ sbd_stack_hogger(unsigned char * inbuf, int kbytes)
     }
 
     if (kbytes > 0) {
-        return sbd_stack_hogger(buf, kbytes-1);
-    } else {
-        return buf[sizeof(buf)-1];
+        sbd_stack_hogger(buf, kbytes-1);
     }
+
+    return;
 }
 
 static void
-- 
1.8.3.1