mirror of
https://github.com/opnsense/src.git
synced 2026-03-28 21:53:16 -04:00
Const-ify the new da_delete_functions.
Remove a redundant sanity check Submitted by: Steven Hartland Obtained from: Netflix MFC after: 3 days
This commit is contained in:
parent
13f6fdf210
commit
8e448c38b1
1 changed files with 2 additions and 5 deletions
|
|
@ -150,7 +150,7 @@ static da_delete_func_t da_delete_trim;
|
|||
static da_delete_func_t da_delete_unmap;
|
||||
static da_delete_func_t da_delete_ws;
|
||||
|
||||
static void * da_delete_functions[] = {
|
||||
static const void * da_delete_functions[] = {
|
||||
NULL,
|
||||
NULL,
|
||||
da_delete_trim,
|
||||
|
|
@ -1818,10 +1818,7 @@ dadeletemethodset(struct da_softc *softc, da_delete_methods delete_method)
|
|||
|
||||
softc->delete_method = delete_method;
|
||||
softc->disk->d_delmaxsize = dadeletemaxsize(softc, delete_method);
|
||||
if (delete_method <= DA_DELETE_MAX)
|
||||
softc->delete_func = da_delete_functions[delete_method];
|
||||
else
|
||||
softc->delete_func = NULL;
|
||||
softc->delete_func = da_delete_functions[delete_method];
|
||||
|
||||
if (softc->delete_method > DA_DELETE_DISABLE)
|
||||
softc->disk->d_flags |= DISKFLAG_CANDELETE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue