diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-10-14 04:59:26 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-10-14 06:11:19 +0200 |
commit | 14bf2c9d375db6a4670bc0ef0e521e35a939a498 (patch) | |
tree | 704fdf5312e54dc1231eecbadc90df3f15b33096 /src/shared/udev-util.h | |
parent | 416446221d905b6815175dc4d525d27f8ae43d1b (diff) |
util: allow trailing semicolons on define_trivial_cleanup_func lines
Emacs C indenting really gets confused by these lines if they carry no
trailing semicolon, hence let's make this nicer for good old emacs. The
other macros which define functions already do this too, so let's copy
the scheme here.
Also, let's use an uppercase name for the macro. So far our rough rule
was that macros that are totally not function-like (like this ones,
which define a function) are uppercase. (Well, admittedly it is a rough
rule only, for example function and variable decorators are all
lower-case SINCE THE CONSTANT YELLING IN THE SOURCES WOULD SUCK, and
also they at least got underscore prefixes.) Also, the macros that
define functions that we already have are all uppercase, so let's do the
same here...
Diffstat (limited to 'src/shared/udev-util.h')
-rw-r--r-- | src/shared/udev-util.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shared/udev-util.h b/src/shared/udev-util.h index bff8f5fbf7..27677af876 100644 --- a/src/shared/udev-util.h +++ b/src/shared/udev-util.h @@ -24,11 +24,11 @@ #include "udev.h" #include "util.h" -define_trivial_cleanup_func(struct udev*, udev_unref) -define_trivial_cleanup_func(struct udev_device*, udev_device_unref) -define_trivial_cleanup_func(struct udev_enumerate*, udev_enumerate_unref) -define_trivial_cleanup_func(struct udev_event*, udev_event_unref) -define_trivial_cleanup_func(struct udev_rules*, udev_rules_unref) +DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev*, udev_unref); +DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_device*, udev_device_unref); +DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_enumerate*, udev_enumerate_unref); +DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_event*, udev_event_unref); +DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_rules*, udev_rules_unref); #define _cleanup_udev_unref_ _cleanup_(udev_unrefp) #define _cleanup_udev_device_unref_ _cleanup_(udev_device_unrefp) |