Skip to content

Commit a1115a7

Browse files
Martin Belangerclaude
andcommitted
nvmf: clean up discovery args struct initialization
Replace literal zero initializers with the proper named constants: .result = 0 -> removed (zero is the default for unspecified fields) .lsp = 0 -> .lsp = NVMF_LOG_DISC_LSP_NONE Also add the missing .timeout = NVME_DEFAULT_IOCTL_TIMEOUT in _nvmf_discovery() to be consistent with nbft_discovery(). Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Signed-off-by: Martin Belanger <[email protected]>
1 parent 11f4d6f commit a1115a7

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

libnvme/src/nvme/fabrics.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,8 +1985,8 @@ static int _nvmf_discovery(struct libnvme_global_ctx *ctx,
19851985
.c = c,
19861986
.args_size = sizeof(args),
19871987
.max_retries = fctx->default_max_discovery_retries,
1988-
.result = 0,
1989-
.lsp = 0,
1988+
.timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
1989+
.lsp = NVMF_LOG_DISC_LSP_NONE,
19901990
};
19911991

19921992
err = nvmf_get_discovery_wargs(&args, &log);
@@ -2668,9 +2668,8 @@ static int nbft_discovery(struct libnvme_global_ctx *ctx,
26682668
.c = c,
26692669
.args_size = sizeof(args),
26702670
.max_retries = 10 /* MAX_DISC_RETRIES */,
2671-
.result = 0,
26722671
.timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
2673-
.lsp = 0,
2672+
.lsp = NVMF_LOG_DISC_LSP_NONE,
26742673
};
26752674

26762675
ret = nvmf_get_discovery_wargs(&args, &log);

0 commit comments

Comments
 (0)