aremmell / libsir

The Standard Incident Reporter library: A lightweight, cross-platform library for information distribution.
https://libsir.rml.dev/
MIT License
34 stars 5 forks source link

Useless check in sirdefaults.h:145:16 (branch: syslog) #25

Closed johnsonjh closed 1 year ago

johnsonjh commented 1 year ago

sirdefaults.h:145:16: style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck]

    = SIRO_ALL | SIRO_NOHOST;
               ^
aremmell commented 1 year ago

It's there for semantics; otherwise people won't grasp it–these options are exclusive, not inclusive, so setting one means "don't do this." without SIRO_ALL, it makes it seem like you're setting no options, but you're setting all of them.