on master help sign in
mk_wcwidth.c: nit
commita247079058c94eac982246460286127a683d4b5d authorJonathan Daugherty <cygnus@foobox.com> dateThu 5 Mar 2020, 11:06 (7 years ago) parent5435e8f
1 file changed+3−5
cbits/mk_wcwidth.c+3−5
cbits/mk_wcwidth.c+3−5
@@ -281,11 +281,9 @@ int vty_init_custom_table(int size)
281281// are not in bounds for the table.
282282int vty_set_custom_table_range(uint32_t start, uint32_t size, uint8_t width)
283283{
284− if (custom_table == NULL) {
285− return 1;
286− } else if ((start + size - 1) >= custom_table_size) {
287− return 1;
288− } else if (custom_table_ready) {
284+ if ((custom_table == NULL) ||
285+ ((start + size - 1) >= custom_table_size) ||
286+ custom_table_ready) {
289287 return 1;
290288 } else {
291289 memset(custom_table + start, (uint8_t) width, size);