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