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>
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;
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);