mcviewer: remove useless assertions.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2019-01-12 12:39:10 +03:00
parent e13ac553d3
commit c652ab9ccc
2 changed files with 1 additions and 6 deletions

View File

@ -104,8 +104,6 @@ mcview_get_filesize (WView * view)
{ {
switch (view->datasource) switch (view->datasource)
{ {
case DS_NONE:
return 0;
case DS_STDIO_PIPE: case DS_STDIO_PIPE:
case DS_VFS_PIPE: case DS_VFS_PIPE:
return mcview_growbuf_filesize (view); return mcview_growbuf_filesize (view);
@ -114,7 +112,6 @@ mcview_get_filesize (WView * view)
case DS_STRING: case DS_STRING:
return view->ds_string_len; return view->ds_string_len;
default: default:
g_assert (!"Unknown datasource type");
return 0; return 0;
} }
} }
@ -357,9 +354,8 @@ mcview_close_datasource (WView * view)
break; break;
case DS_STRING: case DS_STRING:
MC_PTR_FREE (view->ds_string_data); MC_PTR_FREE (view->ds_string_data);
break;
default: default:
g_assert (!"Unknown datasource type"); break;
} }
view->datasource = DS_NONE; view->datasource = DS_NONE;
} }

View File

@ -107,7 +107,6 @@ mcview_get_byte (WView * view, off_t offset, int *retval)
case DS_NONE: case DS_NONE:
return mcview_get_byte_none (view, offset, retval); return mcview_get_byte_none (view, offset, retval);
default: default:
g_assert (!"Unknown datasource type");
return FALSE; return FALSE;
} }
} }