diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2010-10-13 11:54:49 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2010-10-14 10:26:59 -0400 |
commit | e2b6d9cbaf20df26dd371a715fce3ae158f37126 (patch) | |
tree | 70171a6523fae4c37f9ef8a6dfa90f71df014466 /utils/mount/mount.c | |
parent | 013e8ec9ffb9f28f97e58299719023faf846a029 (diff) | |
download | nfs-utils-e2b6d9cbaf20df26dd371a715fce3ae158f37126.tar.gz nfs-utils-e2b6d9cbaf20df26dd371a715fce3ae158f37126.tar.xz nfs-utils-e2b6d9cbaf20df26dd371a715fce3ae158f37126.zip |
mount.nfs: Eliminate compiler warnings in utils/mount/mount.c
Clean up.
mount.c: In function parse_opt:
mount.c:354: warning: conversion to size_t from int may change the
sign of the result
mount.c:354: warning: conversion to int from size_t may change the
sign of the result
mount.c:359: warning: conversion to size_t from int may change the
sign of the result
mount.c:359: warning: conversion to int from size_t may change the
sign of the result
mount.c: In function parse_opts:
mount.c:374: warning: conversion to int from size_t may change the
sign of the result
mount.c:377: warning: conversion to size_t from int may change the
sign of the result
Character string lengths are usually size_t anyway. We can easily
avoid the implicit type cast here.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/mount/mount.c')
-rw-r--r-- | utils/mount/mount.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/mount/mount.c b/utils/mount/mount.c index 1c6a88f..2909595 100644 --- a/utils/mount/mount.c +++ b/utils/mount/mount.c @@ -337,7 +337,7 @@ static void mount_usage(void) printf(_("\tnfsoptions\tRefer to mount.nfs(8) or nfs(5)\n\n")); } -static void parse_opt(const char *opt, int *mask, char *extra_opts, int len) +static void parse_opt(const char *opt, int *mask, char *extra_opts, size_t len) { const struct opt_map *om; @@ -371,7 +371,7 @@ static void parse_opts(const char *options, int *flags, char **extra_opts) if (options != NULL) { char *opts = xstrdup(options); char *opt, *p; - int len = strlen(opts) + 1; /* include room for a null */ + size_t len = strlen(opts) + 1; /* include room for a null */ int open_quote = 0; *extra_opts = xmalloc(len); |