projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf6f7f6
)
cgtop: minimize aux variable scope
author
Lennart Poettering
<lennart@poettering.net>
Mon, 6 Jun 2016 20:04:33 +0000
(22:04 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 6 Jun 2016 20:04:33 +0000
(22:04 +0200)
src/cgtop/cgtop.c
patch
|
blob
|
history
diff --git
a/src/cgtop/cgtop.c
b/src/cgtop/cgtop.c
index 6bd22888970245fc96a164a7a91f5a38a576309b..c67b328b3882176f1781d8301a453192b9aace54 100644
(file)
--- a/
src/cgtop/cgtop.c
+++ b/
src/cgtop/cgtop.c
@@
-868,14
+868,16
@@
static int get_cgroup_root(char **ret) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_free_ char *unit = NULL, *path = NULL;
- char *aux;
const char *m;
int r;
if (arg_root) {
+ char *aux;
+
aux = strdup(arg_root);
if (!aux)
return log_oom();
+
*ret = aux;
return 0;
}