commit e0a73f58f35c5854ad319f4cc8b2410319f5b664
parent 1be8eb3b30fce218798ffe9c5b33db4cf1d0a206
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 17 Sep 2017 12:42:41 +0200
tweaks: drop a bunch of outdated asserts
Diffstat:
1 file changed, 0 insertions(+), 14 deletions(-)
diff --git a/src/history.c b/src/history.c
@@ -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);