udev: fix hex decoding

This commit is contained in:
Lennart Poettering 2010-07-19 01:27:15 +02:00
parent f26c849efc
commit 1552abf628

View file

@ -63,10 +63,10 @@ static int dehex(char x) {
return x - '0';
if (x >= 'A' && x <= 'F')
return x - 'A';
return x - 'A' + 10;
if (x >= 'a' && x <= 'f')
return x - 'a';
return x - 'a' + 10;
return -1;
}