chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3fd1128
)
journal/vacuum: replace readdir_r with readdir
author
Florian Weimer
<fweimer@redhat.com>
Thu, 19 Dec 2013 11:15:58 +0000
(12:15 +0100)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Sat, 21 Dec 2013 23:35:55 +0000
(18:35 -0500)
src/journal/journal-vacuum.c
patch
|
blob
|
history
diff --git
a/src/journal/journal-vacuum.c
b/src/journal/journal-vacuum.c
index d4a1c6c9334ff736bbe3066e7d0b317c71119b7b..b2b47d69b2af815972133869c5618fffe165dc9c 100644
(file)
--- a/
src/journal/journal-vacuum.c
+++ b/
src/journal/journal-vacuum.c
@@
-180,9
+180,7
@@
int journal_directory_vacuum(
return -errno;
for (;;) {
- int k;
struct dirent *de;
- union dirent_storage buf;
size_t q;
struct stat st;
char *p;
@@
-190,9
+188,10
@@
int journal_directory_vacuum(
sd_id128_t seqnum_id;
bool have_seqnum;
- k = readdir_r(d, &buf.de, &de);
- if (k != 0) {
- r = -k;
+ errno = 0;
+ de = readdir(d);
+ if (!de && errno != 0) {
+ r = -errno;
goto finish;
}