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
11463817
Commit
11463817
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: drop a bunch of useless asserts
parent
8b1f283a
master
feature/match-parens
refactor/readbility
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/files.c
+0
-20
src/files.c
with
0 additions
and
20 deletions
+0
-20
src/files.c
View file @
11463817
...
...
@@ -430,8 +430,6 @@ bool open_buffer(const char *filename, bool undoable)
/* rc == -2 means that we have a new file. -1 means that the
* open() failed. 0 means that the open() succeeded. */
assert
(
filename
!=
NULL
);
/* Display newlines in filenames as ^J. */
as_an_at
=
FALSE
;
...
...
@@ -527,8 +525,6 @@ void replace_buffer(const char *filename)
FILE
*
f
;
int
descriptor
;
assert
(
filename
!=
NULL
&&
filename
[
0
]
!=
'\0'
);
/* Open the file quietly. */
descriptor
=
open_file
(
filename
,
FALSE
,
TRUE
,
&
f
);
...
...
@@ -605,8 +601,6 @@ void prepare_for_display(void)
* otherwise, to the previous one. */
void
switch_to_prevnext_buffer
(
bool
to_next
)
{
assert
(
openfile
!=
NULL
);
/* If only one file buffer is open, say so and get out. */
if
(
openfile
==
openfile
->
next
&&
!
inhelp
)
{
statusbar
(
_
(
"No more open file buffers"
));
...
...
@@ -664,8 +658,6 @@ void switch_to_next_buffer_void(void)
* open buffers. */
bool
close_buffer
(
void
)
{
assert
(
openfile
!=
NULL
);
/* If only one file buffer is open, get out. */
if
(
openfile
==
openfile
->
next
)
return
FALSE
;
...
...
@@ -705,8 +697,6 @@ int is_file_writable(const char *filename)
if
(
ISSET
(
VIEW_MODE
))
return
TRUE
;
assert
(
filename
!=
NULL
);
/* Get the specified file's full path. */
full_filename
=
get_full_path
(
filename
);
...
...
@@ -958,8 +948,6 @@ int open_file(const char *filename, bool newfie, bool quiet, FILE **f)
int
fd
;
char
*
full_filename
;
assert
(
filename
!=
NULL
&&
f
!=
NULL
);
/* Get the specified file's full path. */
full_filename
=
get_full_path
(
filename
);
...
...
@@ -1023,8 +1011,6 @@ char *get_next_filename(const char *name, const char *suffix)
char
*
buf
;
size_t
wholenamelen
;
assert
(
name
!=
NULL
&&
suffix
!=
NULL
);
wholenamelen
=
strlen
(
name
)
+
strlen
(
suffix
);
/* Reserve space for: the name plus the suffix plus a dot plus
...
...
@@ -1391,8 +1377,6 @@ char *safe_tempfile(FILE **f)
int
fd
;
mode_t
original_umask
=
0
;
assert
(
f
!=
NULL
);
/* If $TMPDIR is set, set tempdir to it, run it through
* get_full_path(), and save the result in full_tempdir. Otherwise,
* leave full_tempdir set to NULL. */
...
...
@@ -1433,8 +1417,6 @@ char *safe_tempfile(FILE **f)
/* Initialize full_operating_dir based on operating_dir. */
void
init_operating_dir
(
void
)
{
assert
(
full_operating_dir
==
NULL
);
if
(
operating_dir
==
NULL
)
return
;
...
...
@@ -1466,8 +1448,6 @@ bool check_operating_dir(const char *currpath, bool allow_tabcomp)
if
(
operating_dir
==
NULL
)
return
FALSE
;
assert
(
full_operating_dir
!=
NULL
);
fullpath
=
get_full_path
(
currpath
);
/* If fullpath is NULL, it means some directory in the path doesn't
...
...
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