diff options
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r-- | libbb/lineedit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index a46b5d2..2e16e6a 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -989,7 +989,7 @@ static void load_history(const char *fromfile) /* NB: do not trash old history if file can't be opened */ - fp = fopen(fromfile, "r"); + fp = fopen_for_read(fromfile); if (fp) { /* clean up old history */ for (hi = state->cnt_history; hi > 0;) { @@ -1022,7 +1022,7 @@ static void save_history(const char *tofile) { FILE *fp; - fp = fopen(tofile, "w"); + fp = fopen_for_write(tofile); if (fp) { int i; |