Skip to content

Commit 2e05482

Browse files
authored
Merge pull request #487 from martin-belanger/eliminate-empty-arguments
fabrics: Filter out empty strings in add_argument()
2 parents 7bf9d0f + 151b65c commit 2e05482

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/nvme/fabrics.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ static int add_argument(char **argstr, const char *tok, const char *arg)
295295
{
296296
char *nstr;
297297

298-
if (!(arg && strcmp(arg, "none")))
298+
if (!arg || arg[0] == '\0' || !strcmp(arg, "none"))
299299
return 0;
300300
if (asprintf(&nstr, "%s,%s=%s", *argstr, tok, arg) < 0) {
301301
errno = ENOMEM;

0 commit comments

Comments
 (0)