Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
e0a73f58
Commit
e0a73f58
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: drop a bunch of outdated asserts
parent
1be8eb3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/history.c
+0
-14
src/history.c
with
0 additions
and
14 deletions
+0
-14
src/history.c
View file @
e0a73f58
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment