diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-10-11 19:34:17 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-10-13 17:56:54 -0400 |
commit | 872c8faaf2009422a91d227ae0b5c6f04c9d2c69 (patch) | |
tree | a6b03abbcd801638098ec591f48873b39f6a0dcd /src/test/test-libudev.c | |
parent | 51d122af23533b0b8318911c4fc8b128ad8eafb7 (diff) |
Fix write-only use of a few variables
Since the invention of read-only memory, write-only memory has been
considered deprecated. Where appropriate, either make use of the
value, or avoid writing it, to make it clear that it is not used.
Diffstat (limited to 'src/test/test-libudev.c')
-rw-r--r-- | src/test/test-libudev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c index 716767ba5f..f79d20cbfb 100644 --- a/src/test/test-libudev.c +++ b/src/test/test-libudev.c @@ -429,7 +429,7 @@ static int test_enumerate(struct udev *udev, const char *subsystem) return 0; } -static int test_hwdb(struct udev *udev, const char *modalias) { +static void test_hwdb(struct udev *udev, const char *modalias) { struct udev_hwdb *hwdb; struct udev_list_entry *entry; @@ -440,7 +440,7 @@ static int test_hwdb(struct udev *udev, const char *modalias) { printf("\n"); hwdb = udev_hwdb_unref(hwdb); - return 0; + assert(hwdb == NULL); } int main(int argc, char *argv[]) |