Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
61bc2485
Commit
61bc2485
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: chuck a couple of useless asserts
parent
c38f571d
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/browser.c
+0
-4
src/browser.c
src/color.c
+0
-4
src/color.c
src/cut.c
+0
-6
src/cut.c
with
0 additions
and
14 deletions
+0
-14
src/browser.c
View file @
61bc2485
...
...
@@ -344,8 +344,6 @@ char *do_browse_from(const char *inpath)
char
*
path
;
/* This holds the tilde-expanded version of inpath. */
assert
(
inpath
!=
NULL
);
path
=
real_dir_from_tilde
(
inpath
);
/* Perhaps path is a directory. If so, we'll pass it to
...
...
@@ -790,8 +788,6 @@ char *striponedir(const char *path)
{
char
*
retval
,
*
tmp
;
assert
(
path
!=
NULL
);
retval
=
mallocstrcpy
(
NULL
,
path
);
tmp
=
strrchr
(
retval
,
'/'
);
...
...
This diff is collapsed.
Click to expand it.
src/color.c
View file @
61bc2485
...
...
@@ -108,8 +108,6 @@ void color_init(void)
bool
using_defaults
=
FALSE
;
short
foreground
,
background
;
assert
(
openfile
!=
NULL
);
/* If the terminal is not capable of colors, forget it. */
if
(
!
has_colors
())
return
;
...
...
@@ -164,8 +162,6 @@ void color_update(void)
syntaxtype
*
sint
=
NULL
;
colortype
*
ink
;
assert
(
openfile
!=
NULL
);
/* If the rcfiles were not read, or contained no syntaxes, get out. */
if
(
syntaxes
==
NULL
)
return
;
...
...
This diff is collapsed.
Click to expand it.
src/cut.c
View file @
61bc2485
...
...
@@ -82,8 +82,6 @@ void cut_to_eol(void)
{
size_t
data_len
=
strlen
(
openfile
->
current
->
data
);
assert
(
openfile
->
current_x
<=
data_len
);
if
(
openfile
->
current_x
<
data_len
)
/* If we're not at the end of the line, move all the text from
* the current position up to it, not counting the newline at
...
...
@@ -129,8 +127,6 @@ void do_cut_text(bool copy_text, bool cut_till_eof)
#endif
size_t
was_totsize
=
openfile
->
totsize
;
assert
(
openfile
->
current
!=
NULL
&&
openfile
->
current
->
data
!=
NULL
);
/* If a chain of cuts was broken, empty the cutbuffer. */
if
(
!
keep_cutbuffer
)
{
free_filestruct
(
cutbuffer
);
...
...
@@ -262,8 +258,6 @@ void do_uncut_text(void)
{
ssize_t
was_lineno
=
openfile
->
current
->
lineno
;
assert
(
openfile
->
current
!=
NULL
&&
openfile
->
current
->
data
!=
NULL
);
/* If the cutbuffer is empty, get out. */
if
(
cutbuffer
==
NULL
)
return
;
...
...
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
Menu
Projects
Groups
Snippets
Help