Commit e0a73f58 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: drop a bunch of outdated asserts

parent 1be8eb3b
Showing with 0 additions and 14 deletions
+0 -14
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment