tweaks: drop a bunch of outdated asserts
parent
1be8eb3b30
commit
e0a73f58f3
|
@ -80,8 +80,6 @@ void update_history(filestruct **h, const char *s)
|
|||
{
|
||||
filestruct **hage = NULL, **hbot = NULL, *thesame;
|
||||
|
||||
assert(h != NULL && s != NULL);
|
||||
|
||||
if (*h == search_history) {
|
||||
hage = &searchage;
|
||||
hbot = &searchbot;
|
||||
|
@ -93,8 +91,6 @@ void update_history(filestruct **h, const char *s)
|
|||
hbot = &executebot;
|
||||
}
|
||||
|
||||
assert(hage != NULL && hbot != NULL);
|
||||
|
||||
/* See if the string is already in the history. */
|
||||
thesame = find_history(*hbot, *hage, s, HIGHEST_POSITIVE);
|
||||
|
||||
|
@ -137,8 +133,6 @@ void update_history(filestruct **h, const char *s)
|
|||
* that string. If there isn't one, don't move h and return NULL. */
|
||||
char *get_history_older(filestruct **h)
|
||||
{
|
||||
assert(h != NULL);
|
||||
|
||||
if ((*h)->prev == NULL)
|
||||
return NULL;
|
||||
|
||||
|
@ -151,8 +145,6 @@ char *get_history_older(filestruct **h)
|
|||
* that string. If there isn't one, don't move h and return NULL. */
|
||||
char *get_history_newer(filestruct **h)
|
||||
{
|
||||
assert(h != NULL);
|
||||
|
||||
if ((*h)->next == NULL)
|
||||
return NULL;
|
||||
|
||||
|
@ -178,13 +170,9 @@ void get_history_older_void(void)
|
|||
* s. */
|
||||
char *get_history_completion(filestruct **h, char *s, size_t len)
|
||||
{
|
||||
assert(s != NULL);
|
||||
|
||||
if (len > 0) {
|
||||
filestruct *hage = NULL, *hbot = NULL, *p;
|
||||
|
||||
assert(h != NULL);
|
||||
|
||||
if (*h == search_history) {
|
||||
hage = searchage;
|
||||
hbot = searchbot;
|
||||
|
@ -196,8 +184,6 @@ char *get_history_completion(filestruct **h, char *s, size_t len)
|
|||
hbot = executebot;
|
||||
}
|
||||
|
||||
assert(hage != NULL && hbot != NULL);
|
||||
|
||||
/* Search the history list from the current position to the top
|
||||
* for a match of len characters. Skip over an exact match. */
|
||||
p = find_history((*h)->prev, hage, s, len);
|
||||
|
|
Loading…
Reference in New Issue