udev: add assert to make coverity happy
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 11 Feb 2021 08:17:46 +0000 (09:17 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 11 Feb 2021 08:17:46 +0000 (09:17 +0100)
commitb5f1c0d88be57d10db5b06b07d0b0ea4aa220bcd
treec3e4d9b29d95b64c0f43c0e19480df6c50c2bd30
parent372a5002dceba319e39b83c9dae3ce6d1c7cfb51
udev: add assert to make coverity happy

Coverity says:
CID 1446387 (#1 of 1): Bad bit shift operation (BAD_SHIFT)
8. negative_shift: In expression 1U << (int)cmd, shifting by a negative amount
has undefined behavior. The shift amount, cmd, is -22.

I don't think there's any issue, unless we forget to set token->data
appropriately. Let's add an assert.
src/udev/udev-rules.c