chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
unit: shortcut unit_notify() early, if possible
[elogind.git]
/
device.c
diff --git
a/device.c
b/device.c
index 25661e05f80840a579f54e1fa41f71a8050292b9..d99038f77e72fb3c367468b9b9b943e18f05d623 100644
(file)
--- a/
device.c
+++ b/
device.c
@@
-49,6
+49,9
@@
static void device_set_state(Device *d, DeviceState state) {
DeviceState old_state;
assert(d);
+ if (state == d->state)
+ return;
+
old_state = d->state;
d->state = state;