summaryrefslogtreecommitdiff
path: root/src/udev/udev-builtin-keyboard.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-06-02 16:52:07 +0200
committerTom Gundersen <teg@jklm.no>2015-06-02 18:12:47 +0200
commit3b64e4d4f40baac56148c7d333d6a0053358ec7a (patch)
tree770d251059fd20ee9a4ed7510f639a716367c7b0 /src/udev/udev-builtin-keyboard.c
parent7283a80d10217b929acf58899f016ca06dacdc53 (diff)
udev: add some asserts
Mostly for documentation purposes.
Diffstat (limited to 'src/udev/udev-builtin-keyboard.c')
-rw-r--r--src/udev/udev-builtin-keyboard.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/udev/udev-builtin-keyboard.c b/src/udev/udev-builtin-keyboard.c
index ed990c58fb..01f3879f37 100644
--- a/src/udev/udev-builtin-keyboard.c
+++ b/src/udev/udev-builtin-keyboard.c
@@ -37,6 +37,9 @@ static int install_force_release(struct udev_device *dev, const unsigned *releas
unsigned i;
int ret;
+ assert(dev);
+ assert(release);
+
atkbd = udev_device_get_parent_with_subsystem_devtype(dev, "serio", NULL);
if (!atkbd)
return -ENODEV;
@@ -152,6 +155,9 @@ static void set_trackpoint_sensitivity(struct udev_device *dev, const char *valu
char val_s[DECIMAL_STR_MAX(int)];
int r, val_i;
+ assert(dev);
+ assert(value);
+
/* The sensitivity sysfs attr belongs to the serio parent device */
pdev = udev_device_get_parent_with_subsystem_devtype(dev, "serio", NULL);
if (!pdev) {