On Friday, 25. January 2013 16:58:48 Lennart Poettering wrote:
> > -if (fstat(fd, &st) < 0)
> > +if (fstat(fd, &st) < 0) {
> > +close_nointr_nofail(fd);
>
> I figure cppcheck needs to learn about _cleanup_close_... We use gcc's
> cleanup attribute logic to close thi
Detected by cppcheck.
Signed-off-by: Thomas Jarosch
---
src/shared/efivars.c | 27 +--
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/src/shared/efivars.c b/src/shared/efivars.c
index d5cb88c..4402aec 100644
--- a/src/shared/efivars.c
+++ b/src/shared
cppcheck reported:
[src/bootchart/svg.c:791]: (error) Mismatching allocation and deallocation: f
Signed-off-by: Thomas Jarosch
---
src/bootchart/svg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index 156918a..550f769 100644
Detected by cppcheck
Signed-off-by: Thomas Jarosch
---
src/tmpfiles/tmpfiles.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index c27d011..d8fb07e 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
The code should probably look like the statements above it.
Please verify, I just detected it using cppcheck.
Signed-off-by: Thomas Jarosch
---
src/unit.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/unit.c b/src/unit.c
index 903a8e4..c793b11 100644
--- a/src
Detected by cppcheck.
Signed-off-by: Thomas Jarosch
---
src/condition.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/condition.c b/src/condition.c
index f18c454..2b51a16 100644
--- a/src/condition.c
+++ b/src/condition.c
@@ -187,6 +187,8 @@ static bool
On Sunday, 23. October 2011 10:00:36 Dan Williams wrote:
> Is it time for a libmd.so, so systemd can invoke the "--wait-clean --scan"
> process itself? Probably simpler to just SIGTERM mdmon and wait for it.
The mdadm code makes good use of non-reentrant functions like ctime(),
readdir() and oth
Detected by "cppcheck" (actually it detected a file descriptor leak)
Please CC: comments.
Signed-off-by: Thomas Jarosch
---
src/util.c |8 ++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/util.c b/src/util.c
index 7977ee4..ae9d9bd 100644
--- a/src/ut
Detected by "cppcheck"
Please CC: comments.
Signed-off-by: Thomas Jarosch
---
src/tmpfiles.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/tmpfiles.c b/src/tmpfiles.c
index a6b8f85..21bf44d 100644
--- a/src/tmpfiles.c
+++ b/src/tmpfiles.c
@@ -15