chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
udev: link-config - only set *name on success
[elogind.git]
/
src
/
udev
/
net
/
link-config.c
diff --git
a/src/udev/net/link-config.c
b/src/udev/net/link-config.c
index c2881d6b41d0f08c692263684f7946d787762b58..64ff00dc0df40bc291515dc051712ae2e182cf8f 100644
(file)
--- a/
src/udev/net/link-config.c
+++ b/
src/udev/net/link-config.c
@@
-424,8
+424,6
@@
int link_config_apply(link_config_ctx *ctx, link_config *config,
} else
new_name = NULL;
- *name = new_name;
-
switch (config->mac_policy) {
case MACPOLICY_PERSISTENT:
if (mac_is_random(device)) {
@@
-459,6
+457,8
@@
int link_config_apply(link_config_ctx *ctx, link_config *config,
return r;
}
+ *name = new_name;
+
return 0;
}