- if (strncmp (pathordevice, "/dev/", 5) == 0) {
- buf = pathordevice;
- IS_DEVICE (buf, -1);
- } else {
- buf = sysroot_path (pathordevice);
- if (buf == NULL) {
- reply_with_perror ("malloc");
- return -1;
- }
- freeit = 1;
+ is_dev = STREQLEN (pathordevice, "/dev/", 5);
+ buf = is_dev ? strdup (pathordevice)
+ : sysroot_path (pathordevice);
+ if (buf == NULL) {
+ reply_with_perror ("malloc");
+ return -1;