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
cb31e45f
Commit
cb31e45f
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: remove pointless or obscuring asserts
parent
588daf94
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/utils.c
+0
-13
src/utils.c
with
0 additions
and
13 deletions
+0
-13
src/utils.c
View file @
cb31e45f
...
...
@@ -93,8 +93,6 @@ bool parse_num(const char *str, ssize_t *val)
char
*
first_error
;
ssize_t
j
;
assert
(
str
!=
NULL
);
/* The manual page for strtol() says this is required, and
* it looks like it is! */
errno
=
0
;
...
...
@@ -144,8 +142,6 @@ bool parse_line_column(const char *str, ssize_t *line, ssize_t *column)
/* Reduce the memory allocation of a string to what is needed. */
void
snuggly_fit
(
char
**
str
)
{
assert
(
str
!=
NULL
);
if
(
*
str
!=
NULL
)
*
str
=
charealloc
(
*
str
,
strlen
(
*
str
)
+
1
);
}
...
...
@@ -311,8 +307,6 @@ bool is_separate_word(size_t position, size_t length, const char *buf)
size_t
word_end
=
position
+
length
;
bool
retval
;
assert
(
buf
!=
NULL
&&
position
<
strlen
(
buf
)
&&
position
+
length
<=
strlen
(
buf
));
/* Get the characters before and after the word, if any. */
parse_mbchar
(
buf
+
move_mbleft
(
buf
,
position
),
before
,
NULL
);
parse_mbchar
(
buf
+
word_end
,
after
,
NULL
);
...
...
@@ -344,8 +338,6 @@ const char *strstrwrapper(const char *haystack, const char *needle,
if
((
start
>
haystack
&&
*
(
start
-
1
)
==
'\0'
)
||
start
<
haystack
)
return
NULL
;
assert
(
haystack
!=
NULL
&&
needle
!=
NULL
&&
start
!=
NULL
);
#ifdef HAVE_REGEX_H
if
(
ISSET
(
USE_REGEXP
))
{
if
(
ISSET
(
BACKWARDS_SEARCH
))
{
...
...
@@ -547,9 +539,6 @@ void remove_magicline(void)
{
if
(
openfile
->
filebot
->
data
[
0
]
==
'\0'
&&
openfile
->
filebot
!=
openfile
->
fileage
)
{
assert
(
openfile
->
filebot
!=
openfile
->
edittop
&&
openfile
->
filebot
!=
openfile
->
current
);
openfile
->
filebot
=
openfile
->
filebot
->
prev
;
free_filestruct
(
openfile
->
filebot
->
next
);
openfile
->
filebot
->
next
=
NULL
;
...
...
@@ -565,8 +554,6 @@ void remove_magicline(void)
void
mark_order
(
const
filestruct
**
top
,
size_t
*
top_x
,
const
filestruct
**
bot
,
size_t
*
bot_x
,
bool
*
right_side_up
)
{
assert
(
top
!=
NULL
&&
top_x
!=
NULL
&&
bot
!=
NULL
&&
bot_x
!=
NULL
);
if
((
openfile
->
current
->
lineno
==
openfile
->
mark_begin
->
lineno
&&
openfile
->
current_x
>
openfile
->
mark_begin_x
)
||
openfile
->
current
->
lineno
>
openfile
->
mark_begin
->
lineno
)
{
...
...
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