diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-27 18:03:20 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-27 18:03:20 +0100 |
| commit | 3d27d435dbe7d39894257894b9dd32bfa607604c (patch) | |
| tree | ddf5842839edb7c826ed54efa37d736c68750a2b /libbb | |
| parent | 2beb1f6fafc341f571501829fc17773f2e0ddbbf (diff) | |
| download | busybox-w32-3d27d435dbe7d39894257894b9dd32bfa607604c.tar.gz busybox-w32-3d27d435dbe7d39894257894b9dd32bfa607604c.tar.bz2 busybox-w32-3d27d435dbe7d39894257894b9dd32bfa607604c.zip | |
randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
| -rw-r--r-- | libbb/lineedit.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 3ed38e54d..0a888fa70 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
| @@ -1373,6 +1373,16 @@ void FAST_FUNC show_history(const line_input_t *st) | |||
| 1373 | printf("%4d %s\n", i, st->history[i]); | 1373 | printf("%4d %s\n", i, st->history[i]); |
| 1374 | } | 1374 | } |
| 1375 | 1375 | ||
| 1376 | void FAST_FUNC free_line_input_t(line_input_t *n) | ||
| 1377 | { | ||
| 1378 | # if ENABLE_FEATURE_EDITING_SAVEHISTORY | ||
| 1379 | int i = n->cnt_history; | ||
| 1380 | while (i > 0) | ||
| 1381 | free(n->history[--i]); | ||
| 1382 | #endif | ||
| 1383 | free(n); | ||
| 1384 | } | ||
| 1385 | |||
| 1376 | # if ENABLE_FEATURE_EDITING_SAVEHISTORY | 1386 | # if ENABLE_FEATURE_EDITING_SAVEHISTORY |
| 1377 | /* We try to ensure that concurrent additions to the history | 1387 | /* We try to ensure that concurrent additions to the history |
| 1378 | * do not overwrite each other. | 1388 | * do not overwrite each other. |
| @@ -1382,14 +1392,6 @@ void FAST_FUNC show_history(const line_input_t *st) | |||
| 1382 | * than configured MAX_HISTORY lines. | 1392 | * than configured MAX_HISTORY lines. |
| 1383 | */ | 1393 | */ |
| 1384 | 1394 | ||
| 1385 | void FAST_FUNC free_line_input_t(line_input_t *n) | ||
| 1386 | { | ||
| 1387 | int i = n->cnt_history; | ||
| 1388 | while (i > 0) | ||
| 1389 | free(n->history[--i]); | ||
| 1390 | free(n); | ||
| 1391 | } | ||
| 1392 | |||
| 1393 | /* state->flags is already checked to be nonzero */ | 1395 | /* state->flags is already checked to be nonzero */ |
| 1394 | static void load_history(line_input_t *st_parm) | 1396 | static void load_history(line_input_t *st_parm) |
| 1395 | { | 1397 | { |
