There are two cases of UB that are fixed in this commit.
1. In ethercatmain.c, there are two left shifts of 31:
(1 << 31)
Because 1 is a signed int by default, the result cannot be represented
in an int. The fix is to explicitly make the 1 unsigned.
2. In ethercatconfig.c, for slaves that have no inputs, the code would
apply an offset to a NULL pointer. The fix is to test that the slave
has inputs available before applying the offset.
Both cases were found by clang with the help of UBSan.