diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-08-09 11:21:06 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-08-22 15:56:50 +1000 |
commit | 20a61845d3c93c337bf3331a6bac30cf66c2a293 (patch) | |
tree | 11df4240e6628f211ab48c9b75d066f7d399968c /config/udev.c | |
parent | d33652dad8838ab0a9175ca4613a3161ebc5676f (diff) |
config: use add_option for '_source' too
_source was being allocated manually, with all other options added to that
list through add_option. Skip the manual part, allocate the first option
_source with add_option too.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'config/udev.c')
-rw-r--r-- | config/udev.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/config/udev.c b/config/udev.c index b11c81d8e..1f431c1d3 100644 --- a/config/udev.c +++ b/config/udev.c @@ -93,13 +93,7 @@ device_added(struct udev_device *udev_device) return; } - options = calloc(sizeof(*options), 1); - if (!options) - return; - - options->key = strdup("_source"); - options->value = strdup("server/udev"); - if (!options->key || !options->value) + if (!add_option(&options, "_source", "server/udev")) goto unwind; parent = udev_device_get_parent(udev_device); |