diff options
Diffstat (limited to 'usr.sbin/ctld/kernel.c')
-rw-r--r-- | usr.sbin/ctld/kernel.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/ctld/kernel.c b/usr.sbin/ctld/kernel.c index 890bb2b..02b616c 100644 --- a/usr.sbin/ctld/kernel.c +++ b/usr.sbin/ctld/kernel.c @@ -913,12 +913,8 @@ kernel_port_remove(struct target *targ) req.num_args = 2; req.args = malloc(req.num_args * sizeof(*req.args)); str_arg(&req.args[0], "cfiscsi_target", targ->t_name); - if (targ->t_portal_group) { - snprintf(tagstr, sizeof(tagstr), "%d", - targ->t_portal_group->pg_tag); - str_arg(&req.args[1], "cfiscsi_portal_group_tag", tagstr); - } else - req.num_args--; + snprintf(tagstr, sizeof(tagstr), "%d", targ->t_portal_group->pg_tag); + str_arg(&req.args[1], "cfiscsi_portal_group_tag", tagstr); error = ioctl(ctl_fd, CTL_PORT_REQ, &req); free(req.args); |