chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-daemon: remove unnecessary memset calls
[elogind.git]
/
src
/
cgtop
/
cgtop.c
diff --git
a/src/cgtop/cgtop.c
b/src/cgtop/cgtop.c
index ddb57094b1c527328ee1b152f8660babec1f9b39..5557094a4f8bfb3ba5678a9731eb4dfd57c61401 100644
(file)
--- a/
src/cgtop/cgtop.c
+++ b/
src/cgtop/cgtop.c
@@
-310,7
+310,7
@@
static int refresh_one(
if (r <= 0)
goto finish;
if (r <= 0)
goto finish;
- p = join(path, "/", fn, NULL);
+ p =
str
join(path, "/", fn, NULL);
free(fn);
if (!p) {
free(fn);
if (!p) {
@@
-341,17
+341,22
@@
static int refresh(Hashmap *a, Hashmap *b, unsigned iteration) {
r = refresh_one("name=systemd", "/", a, b, iteration, 0);
if (r < 0)
r = refresh_one("name=systemd", "/", a, b, iteration, 0);
if (r < 0)
- return r;
-
+ if (r != -ENOENT)
+ return r;
r = refresh_one("cpuacct", "/", a, b, iteration, 0);
if (r < 0)
r = refresh_one("cpuacct", "/", a, b, iteration, 0);
if (r < 0)
- return r;
-
+ if (r != -ENOENT)
+ return r;
r = refresh_one("memory", "/", a, b, iteration, 0);
if (r < 0)
r = refresh_one("memory", "/", a, b, iteration, 0);
if (r < 0)
- return r;
+ if (r != -ENOENT)
+ return r;
- return refresh_one("blkio", "/", a, b, iteration, 0);
+ r = refresh_one("blkio", "/", a, b, iteration, 0);
+ if (r < 0)
+ if (r != -ENOENT)
+ return r;
+ return 0;
}
static int group_compare(const void*a, const void *b) {
}
static int group_compare(const void*a, const void *b) {