diff options
Diffstat (limited to 'libbb/write.c')
-rw-r--r-- | libbb/write.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libbb/write.c b/libbb/write.c index 37f461720..116e4d153 100644 --- a/libbb/write.c +++ b/libbb/write.c | |||
@@ -10,11 +10,10 @@ | |||
10 | #include "libbb.h" | 10 | #include "libbb.h" |
11 | 11 | ||
12 | /* Open file and write string str to it, close file. | 12 | /* Open file and write string str to it, close file. |
13 | * Die on any open or write-error. */ | 13 | * Die on any open or write error. */ |
14 | void FAST_FUNC xopen_xwrite_close(const char* file, const char* str) | 14 | void FAST_FUNC xopen_xwrite_close(const char* file, const char* str) |
15 | { | 15 | { |
16 | int fd = xopen(file, O_WRONLY); | 16 | int fd = xopen(file, O_WRONLY); |
17 | 17 | xwrite_str(fd, str); | |
18 | xwrite(fd, str, strlen(str)); | ||
19 | close(fd); | 18 | close(fd); |
20 | } | 19 | } |