Skip to content

Commit

Permalink
10165 libzpool: passing argument 1 to restrict-qualified parameter al…
Browse files Browse the repository at this point in the history
…iases with argument 4

Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
Reviewed by: John Levon <john.levon@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>
  • Loading branch information
tsoome authored and Dan McDonald committed Jan 18, 2019
1 parent 04443fd commit f91fcf5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions usr/src/uts/common/fs/zfs/dsl_dataset.c
Original file line number Diff line number Diff line change
Expand Up @@ -2130,7 +2130,10 @@ dsl_get_mountpoint(dsl_dataset_t *ds, const char *dsname, char *value,
return (error);
}

/* Process the dsname and source to find the full mountpoint string */
/*
* Process the dsname and source to find the full mountpoint string.
* Can be skipped for 'legacy' or 'none'.
*/
if (value[0] == '/') {
char *buf = kmem_alloc(ZAP_MAXVALUELEN, KM_SLEEP);
char *root = buf;
Expand Down Expand Up @@ -2181,10 +2184,8 @@ dsl_get_mountpoint(dsl_dataset_t *ds, const char *dsname, char *value,
relpath);
}
kmem_free(buf, ZAP_MAXVALUELEN);
} else {
/* 'legacy' or 'none' */
(void) snprintf(value, ZAP_MAXVALUELEN, "%s", value);
}

return (0);
}

Expand Down

0 comments on commit f91fcf5

Please sign in to comment.