Blame SOURCES/0008-Refactor-sbd-common-no-reason-for-stack-hogger-havin.patch

1e6485
From 8e94781169fc2f36eb49078de1978ceb53df6b6c Mon Sep 17 00:00:00 2001
1e6485
From: Klaus Wenninger <klaus.wenninger@aon.at>
1e6485
Date: Mon, 15 Apr 2019 17:40:26 +0200
1e6485
Subject: [PATCH] Refactor: sbd-common: no reason for stack-hogger having
1e6485
 retval
1e6485
1e6485
---
1e6485
 src/sbd-common.c | 10 +++++-----
1e6485
 1 file changed, 5 insertions(+), 5 deletions(-)
1e6485
1e6485
diff --git a/src/sbd-common.c b/src/sbd-common.c
1e6485
index 3966f25..873a76e 100644
1e6485
--- a/src/sbd-common.c
1e6485
+++ b/src/sbd-common.c
1e6485
@@ -568,13 +568,13 @@ enum {
1e6485
 #define IOPRIO_PRIO_DATA(mask)  ((mask) & IOPRIO_PRIO_MASK)
1e6485
 #define IOPRIO_PRIO_VALUE(class, data)  (((class) << IOPRIO_CLASS_SHIFT) | data)
1e6485
 
1e6485
-static unsigned char
1e6485
+static void
1e6485
 sbd_stack_hogger(unsigned char * inbuf, int kbytes)
1e6485
 {
1e6485
     unsigned char buf[1024];
1e6485
 
1e6485
     if(kbytes <= 0) {
1e6485
-        return HOG_CHAR;
1e6485
+        return;
1e6485
     }
1e6485
 
1e6485
     if (inbuf == NULL) {
1e6485
@@ -584,10 +584,10 @@ sbd_stack_hogger(unsigned char * inbuf, int kbytes)
1e6485
     }
1e6485
 
1e6485
     if (kbytes > 0) {
1e6485
-        return sbd_stack_hogger(buf, kbytes-1);
1e6485
-    } else {
1e6485
-        return buf[sizeof(buf)-1];
1e6485
+        sbd_stack_hogger(buf, kbytes-1);
1e6485
     }
1e6485
+
1e6485
+    return;
1e6485
 }
1e6485
 
1e6485
 static void
1e6485
-- 
1e6485
1.8.3.1
1e6485