diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-03-27 14:28:24 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-03-28 09:03:06 +0100 |
commit | 10c353e1c58d1496f591a48036369021212d8652 (patch) | |
tree | 7fc3878c4d3bca99f1726f366d8a3a2dbc826349 /src/shared/fstab-util.h | |
parent | 4e494d17dbba1db9fd10144f7a1056772f7f9cd0 (diff) | |
download | systemd-10c353e1c58d1496f591a48036369021212d8652.tar.gz |
Remove variable only used for an assert
When compiled with -DNDEBUG, we get warnings about set-but-unused variables.
In general, it's not something we care about, but since removing those
variables arguably makes the code nicer, let's just to it in this case.
Diffstat (limited to 'src/shared/fstab-util.h')
-rw-r--r-- | src/shared/fstab-util.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/shared/fstab-util.h b/src/shared/fstab-util.h index 9820f78ca8..0862256511 100644 --- a/src/shared/fstab-util.h +++ b/src/shared/fstab-util.h @@ -20,14 +20,12 @@ static inline bool fstab_test_option(const char *opts, const char *names) { int fstab_find_pri(const char *options, int *ret); static inline bool fstab_test_yes_no_option(const char *opts, const char *yes_no) { - int r; const char *opt; /* If first name given is last, return 1. * If second name given is last or neither is found, return 0. */ - r = fstab_filter_options(opts, yes_no, &opt, NULL, NULL); - assert(r >= 0); + assert_se(fstab_filter_options(opts, yes_no, &opt, NULL, NULL) >= 0); return opt == yes_no; } |