musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/include/syslog.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2024年06月13日 11:48:40 -0400
committerRich Felker <dalias@aerifal.cx>2024年06月13日 11:48:40 -0400
commit895736d49bd2bb318c69de99a05ea70c035c2da9 (patch)
treebfcd48c5dc8b815755818ad2afe515cc629f9c8c /include/syslog.h
parent05ce67fea99ca09cd4b6625cff7aec9cc222dd5a (diff)
downloadmusl-895736d49bd2bb318c69de99a05ea70c035c2da9.tar.gz
syslog: fix incorrect LOG_MAKEPRI and LOG_FAC[MASK] macros
these are nonstandard and unnecessary for using the associated functionality, but resulted in applications that used them malfunctioning. patch based on proposed fix by erny hombre.
Diffstat (limited to 'include/syslog.h')
-rw-r--r--include/syslog.h 6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/syslog.h b/include/syslog.h
index 5b4d2964..976fee09 100644
--- a/include/syslog.h
+++ b/include/syslog.h
@@ -18,7 +18,7 @@ extern "C" {
#define LOG_PRIMASK 7
#define LOG_PRI(p) ((p)&LOG_PRIMASK)
-#define LOG_MAKEPRI(f, p) (((f)<<3)|(p))
+#define LOG_MAKEPRI(f, p) ((f)|(p))
#define LOG_MASK(p) (1<<(p))
#define LOG_UPTO(p) ((1<<((p)+1))-1)
@@ -46,8 +46,8 @@ extern "C" {
#define LOG_LOCAL7 (23<<3)
#define LOG_NFACILITIES 24
-#define LOG_FACMASK 0x3f8
-#define LOG_FAC(p) (((p)&LOG_FACMASK)>>3)
+#define LOG_FACMASK 0xf8
+#define LOG_FAC(p) ((p)&LOG_FACMASK)
#define LOG_PID 0x01
#define LOG_CONS 0x02
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月02日 09:16:01 +0000

AltStyle によって変換されたページ (->オリジナル) /