From: Tom Gundersen Date: Tue, 2 Jun 2015 14:53:36 +0000 (+0200) Subject: udev-builtin: path_id - don't pass NULL to udev_device_get_parent() X-Git-Tag: v221~215 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=28541a3d7c8b1caf0bda5e812566a1f5e7956352;p=platform%2Fupstream%2Fsystemd.git udev-builtin: path_id - don't pass NULL to udev_device_get_parent() Being explicit about this makes the code easier to follow IMHO. --- diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c index 0fa11f6..4ca0a69 100644 --- a/src/udev/udev-builtin-path_id.c +++ b/src/udev/udev-builtin-path_id.c @@ -665,7 +665,8 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool supported_parent = true; } - parent = udev_device_get_parent(parent); + if (parent) + parent = udev_device_get_parent(parent); } /*