]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
fix compile errors from recent pr
authorKeith Busch <kbusch@kernel.org>
Fri, 26 Jun 2020 20:43:26 +0000 (13:43 -0700)
committerKeith Busch <kbusch@kernel.org>
Fri, 26 Jun 2020 20:43:26 +0000 (13:43 -0700)
Signed-off-by: Keith Busch <kbusch@kernel.org>
plugins/zns/zns.c

index 407e7f90293153c4380aba0d3dd3f7ad0aabddbc..803887d5ff8ee07bc51406df837f64758313ac07 100644 (file)
@@ -132,7 +132,6 @@ static int __zns_mgmt_send(int fd, __u32 namespace_id, __u64 zslba,
 
        err = nvme_zns_mgmt_send(fd, namespace_id, zslba, select_all, zsa,
                        data_len, buf);
-close_fd:
        close(fd);
        return err;
 }
@@ -170,8 +169,8 @@ static int zns_mgmt_send(int argc, char **argv, struct command *cmd, struct plug
        if (fd < 0)
                goto free;
 
-       if (!namespace_id) {
-               err = namespace_id = nvme_get_nsid(fd);
+       if (!cfg.namespace_id) {
+               err = cfg.namespace_id = nvme_get_nsid(fd);
                if (err < 0) {
                        perror("get-namespace-id");
                        goto free;
@@ -370,7 +369,6 @@ static int set_zone_desc(int argc, char **argv, struct command *cmd, struct plug
        int fd, ffd = STDIN_FILENO, err;
        void *buf = NULL;
        __u32 data_len;
-       uint8_t lbaf;
 
        struct config {
                __u64   zslba;