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