udev: fix codesonar warnings
Fixed below systemd codesonar warning.
isprint() is invoked here with an argument of signed
type char, but only has defined behavior for int arguments that are
either representable as unsigned char or equal to the value
of macro EOF(-1).
As per codesonar report, in a number of libc implementations, isprint()
function implemented using lookup tables (arrays): passing in a
negative value can result in a read underrun.
(cherry picked from commit
e7e954243a17cceb5278aac6249ee0dcc119b1eb)
(cherry picked from commit
1b9c95bfbf7e5fc32e033851bf06f0a9f7f9f08b)