diff options
author | Brian Behlendorf <[email protected]> | 2010-07-26 10:24:26 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-07-26 10:24:26 -0700 |
commit | 849c50e7f2487dd3f1dce1417e51dff3a12338d6 (patch) | |
tree | 3ce4f2c2eb0edda59c3efeae2cd524ae19fab396 /cmd/splat.c | |
parent | 8b0eb3f0dcf293467ddfd4b0f0d7e757f2369452 (diff) |
Fix two minor compiler warnings
In cmd/splat.c there was a comparison between an __u32 and an int. To
resolve the issue simply use a __u32 and strtoul() when converting the
provided user string.
In module/spl/spl-vnode.c we should explicitly cast nd->last.name to
a const char * which is what is expected by the prototype.
Diffstat (limited to 'cmd/splat.c')
-rw-r--r-- | cmd/splat.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd/splat.c b/cmd/splat.c index c0bb7d8d4..2fa0c50c0 100644 --- a/cmd/splat.c +++ b/cmd/splat.c @@ -316,14 +316,15 @@ static test_t *test_find(char *sub_str, char *test_str) ListIterator si, ti; subsystem_t *sub; test_t *test; - int sub_num, test_num; + __u32 sub_num, test_num; - /* No error checking here because it may not be a number, it's + /* + * No error checking here because it may not be a number, it's * perfectly OK for it to be a string. Since we're just using * it for comparison purposes this is all very safe. */ - sub_num = strtol(sub_str, NULL, 0); - test_num = strtol(test_str, NULL, 0); + sub_num = strtoul(sub_str, NULL, 0); + test_num = strtoul(test_str, NULL, 0); si = list_iterator_create(subsystems); |