outchannel: eleminate type cast for compatibility reasons
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
This commit is contained in:
parent
9effb33e38
commit
6ed3260b1a
@ -0,0 +1,74 @@
|
|||||||
|
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
|
||||||
|
|
||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
Name: rsyslog
|
Name: rsyslog
|
||||||
Version: 8.2210.0
|
Version: 8.2210.0
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: The rocket-fast system for log processing
|
Summary: The rocket-fast system for log processing
|
||||||
License: (GPLv3+ and ASL 2.0)
|
License: (GPLv3+ and ASL 2.0)
|
||||||
URL: http://www.rsyslog.com/
|
URL: http://www.rsyslog.com/
|
||||||
@ -39,6 +39,7 @@ Patch6004: backport-imjournal-add-second-fallback-to-_COMM.patch
|
|||||||
Patch6005: backport-bugfix-prevent-pot.-segfault-when-switchung.patch
|
Patch6005: backport-bugfix-prevent-pot.-segfault-when-switchung.patch
|
||||||
Patch6006: backport-core-bugfix-using-uuid-msg-prop-can-deadloc.patch
|
Patch6006: backport-core-bugfix-using-uuid-msg-prop-can-deadloc.patch
|
||||||
Patch6007: backport-GNUTls-Driver-Fix-memory-leaks-in-gtlsInitC.patch
|
Patch6007: backport-GNUTls-Driver-Fix-memory-leaks-in-gtlsInitC.patch
|
||||||
|
Patch6008: backport-outchannel-eleminate-type-cast-for-compatibility-rea.patch
|
||||||
|
|
||||||
BuildRequires: gcc autoconf automake bison dos2unix flex pkgconfig python3-docutils libtool
|
BuildRequires: gcc autoconf automake bison dos2unix flex pkgconfig python3-docutils libtool
|
||||||
BuildRequires: libgcrypt-devel libuuid-devel zlib-devel krb5-devel libnet-devel gnutls-devel
|
BuildRequires: libgcrypt-devel libuuid-devel zlib-devel krb5-devel libnet-devel gnutls-devel
|
||||||
@ -513,6 +514,12 @@ done
|
|||||||
%{_mandir}/man1/rscryutil.1.gz
|
%{_mandir}/man1/rscryutil.1.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 19 2023 zhangqiumiao <zhangqiumiao1@huawei.com> - 8.2210.0-4
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: outchannel: eleminate type cast for compatibility reasons
|
||||||
|
|
||||||
* Sun Jun 25 2023 linzhuorong <linzhuorong@huawei.com> - 8.2210.0-3
|
* Sun Jun 25 2023 linzhuorong <linzhuorong@huawei.com> - 8.2210.0-3
|
||||||
- Type:NA
|
- Type:NA
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user