projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
695a944
)
string-util: use fflush_and_check() where appropriate
author
Lennart Poettering
<lennart@poettering.net>
Fri, 20 Apr 2018 13:22:29 +0000
(15:22 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 24 Apr 2018 13:58:31 +0000
(15:58 +0200)
src/basic/string-util.c
patch
|
blob
|
history
diff --git
a/src/basic/string-util.c
b/src/basic/string-util.c
index
41413b5
..
07c9938
100644
(file)
--- a/
src/basic/string-util.c
+++ b/
src/basic/string-util.c
@@
-21,6
+21,7
@@
#include "terminal-util.h"
#include "utf8.h"
#include "util.h"
+#include "fileio.h"
int strcmp_ptr(const char *a, const char *b) {
@@
-794,7
+795,7
@@
char *strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]) {
}
}
- if (f
error(f)
) {
+ if (f
flush_and_check(f) < 0
) {
fclose(f);
return mfree(obuf);
}