commit | 13c54e7232a130280f7752f5255cb73ca609fc73 | [log] [tgz] |
---|---|---|
author | Hanyuan Zhao <hanyuan-z@qq.com> | Tue Mar 05 15:37:33 2024 +0800 |
committer | Tom Rini <trini@konsulko.com> | Wed Mar 13 12:40:43 2024 -0400 |
tree | 16db46cea205f23cfbf2d0c125bf450f5c687ebb | |
parent | 198fd35b765b9af197f91b64587f37655d829dac [diff] |
cli: panic when failed to allocate memory for the history buffer This commit simply modifies the history initialize function, replacing the return value by panic with reasons. The calling chains of hist_init don't have steps explicitly throwing or dealing with the ENOMEM error, and once the init fails, the whole system is died. Using panic here to provide error information instead. Signed-off-by: Hanyuan Zhao <hanyuan-z@qq.com>