tweaks: chuck a couple of useless asserts
parent
c38f571d4b
commit
61bc248555
|
@ -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, '/');
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue