mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
In many of our internal functions that take a pointer + a size we have introduced the rule that SIZE_MAX as size means: take strlen(). sd_journal_add_match() has something similar, but the special value is 0, not SIZE_MAX. This is a bit ugly, since a zero size data block is theoretically fine. The only reason sd_journal_add_match() gets away with using this special value is because valid matches must consist of at least 2 chars, hence cannot be zero. But let's make this more robust and less surprising when compared to the rest of our code, and *also* accept SIZE_MAX to mean strlen(). No actual code changes, just some clean-up.