75 lines
1.8 KiB
Diff
75 lines
1.8 KiB
Diff
|
|
From d8c9771ad5d4a9ef952968a3aeadcecc2e1752a6 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Dominik Andreas Schorpp <dominik.a.schorpp@vivavis.com>
|
||
|
|
Date: Mon, 2 Jan 2023 15:27:39 +0100
|
||
|
|
Subject: [PATCH] outchannel: eleminate type cast for compatibility reasons
|
||
|
|
|
||
|
|
According to the manpage the input for isspace must be of type unsigend char.
|
||
|
|
Remove all unnecessary type cast to achieve this.
|
||
|
|
|
||
|
|
Reference:https://github.com/rsyslog/rsyslog/pull/5056
|
||
|
|
Conflict:NA
|
||
|
|
|
||
|
|
Signed-off-by: Dominik Andreas Schorpp <dominik.a.schorpp@vivavis.com>
|
||
|
|
---
|
||
|
|
outchannel.c | 14 +++++++-------
|
||
|
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/outchannel.c b/outchannel.c
|
||
|
|
index 2f456b5..2362810 100644
|
||
|
|
--- a/outchannel.c
|
||
|
|
+++ b/outchannel.c
|
||
|
|
@@ -67,19 +67,19 @@ struct outchannel* ochConstruct(void)
|
||
|
|
/* skips the next comma and any whitespace
|
||
|
|
* in front and after it.
|
||
|
|
*/
|
||
|
|
-static void skip_Comma(char **pp)
|
||
|
|
+static void skip_Comma(uchar **pp)
|
||
|
|
{
|
||
|
|
- register char *p;
|
||
|
|
+ register uchar *p;
|
||
|
|
|
||
|
|
assert(pp != NULL);
|
||
|
|
assert(*pp != NULL);
|
||
|
|
|
||
|
|
p = *pp;
|
||
|
|
- while(isspace((int)*p))
|
||
|
|
+ while(isspace(*p))
|
||
|
|
++p;
|
||
|
|
if(*p == ',')
|
||
|
|
++p;
|
||
|
|
- while(isspace((int)*p))
|
||
|
|
+ while(isspace(*p))
|
||
|
|
++p;
|
||
|
|
*pp = p;
|
||
|
|
}
|
||
|
|
@@ -98,7 +98,7 @@ static rsRetVal get_Field(uchar **pp, uchar **pField)
|
||
|
|
assert(*pp != NULL);
|
||
|
|
assert(pField != NULL);
|
||
|
|
|
||
|
|
- skip_Comma((char**)pp);
|
||
|
|
+ skip_Comma(pp);
|
||
|
|
p = *pp;
|
||
|
|
|
||
|
|
CHKiRet(cstrConstruct(&pStrB));
|
||
|
|
@@ -135,7 +135,7 @@ static int get_off_t(uchar **pp, off_t *pOff_t)
|
||
|
|
assert(*pp != NULL);
|
||
|
|
assert(pOff_t != NULL);
|
||
|
|
|
||
|
|
- skip_Comma((char**)pp);
|
||
|
|
+ skip_Comma(pp);
|
||
|
|
p = *pp;
|
||
|
|
|
||
|
|
val = 0;
|
||
|
|
@@ -166,7 +166,7 @@ static rsRetVal get_restOfLine(uchar **pp, uchar **pBuf)
|
||
|
|
assert(*pp != NULL);
|
||
|
|
assert(pBuf != NULL);
|
||
|
|
|
||
|
|
- skip_Comma((char**)pp);
|
||
|
|
+ skip_Comma(pp);
|
||
|
|
p = *pp;
|
||
|
|
|
||
|
|
CHKiRet(cstrConstruct(&pStrB));
|
||
|
|
--
|
||
|
|
2.23.0
|
||
|
|
|