Searched hist:"3 ce64010" (Results 1 – 1 of 1) sorted by relevance
/freebsd/bin/sh/ |
H A D | histedit.c | 3ce64010 Mon Mar 20 16:42:59 GMT 2023 Daniel Kolesa <q66@chimera-linux.org> sh(1): fix history file write checking
We cannot just compare histsizeval() against 0, since that returns a string pointer, which is always non-zero (non-null). The logic in sethistsize() initializes the history size to 100 with values that are non-number, and an empty string counts as that. Therefore, the only time we want to not write into history with HISTSIZE val set is when it's explicitly 0.
MFC after: 2 weeks 3ce64010 Mon Mar 20 16:42:59 GMT 2023 Daniel Kolesa <q66@chimera-linux.org> sh(1): fix history file write checking
We cannot just compare histsizeval() against 0, since that returns a string pointer, which is always non-zero (non-null). The logic in sethistsize() initializes the history size to 100 with values that are non-number, and an empty string counts as that. Therefore, the only time we want to not write into history with HISTSIZE val set is when it's explicitly 0.
MFC after: 2 weeks 3ce64010 Mon Mar 20 16:42:59 GMT 2023 Daniel Kolesa <q66@chimera-linux.org> sh(1): fix history file write checking
We cannot just compare histsizeval() against 0, since that returns a string pointer, which is always non-zero (non-null). The logic in sethistsize() initializes the history size to 100 with values that are non-number, and an empty string counts as that. Therefore, the only time we want to not write into history with HISTSIZE val set is when it's explicitly 0.
MFC after: 2 weeks 3ce64010 Mon Mar 20 16:42:59 GMT 2023 Daniel Kolesa <q66@chimera-linux.org> sh(1): fix history file write checking
We cannot just compare histsizeval() against 0, since that returns a string pointer, which is always non-zero (non-null). The logic in sethistsize() initializes the history size to 100 with values that are non-number, and an empty string counts as that. Therefore, the only time we want to not write into history with HISTSIZE val set is when it's explicitly 0.
MFC after: 2 weeks
|