diff options
Diffstat (limited to 'lib/fuse_opt.c')
-rw-r--r-- | lib/fuse_opt.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/fuse_opt.c b/lib/fuse_opt.c index a2118ce..bd7a6ee 100644 --- a/lib/fuse_opt.c +++ b/lib/fuse_opt.c @@ -6,6 +6,7 @@ See the file COPYING.LIB */ +#include "config.h" #include "fuse_opt.h" #include "fuse_misc.h" @@ -92,13 +93,6 @@ int fuse_opt_insert_arg(struct fuse_args *args, int pos, const char *arg) return fuse_opt_insert_arg_common(args, pos, arg); } -int fuse_opt_insert_arg_compat(struct fuse_args *args, int pos, - const char *arg); -int fuse_opt_insert_arg_compat(struct fuse_args *args, int pos, const char *arg) -{ - return fuse_opt_insert_arg_common(args, pos, arg); -} - static int next_arg(struct fuse_opt_context *ctx, const char *opt) { if (ctx->argctr + 1 >= ctx->argc) { @@ -211,11 +205,13 @@ static int process_opt_param(void *var, const char *format, const char *param, { assert(format[0] == '%'); if (format[1] == 's') { + char **s = var; char *copy = strdup(param); if (!copy) return alloc_failed(); - *(char **) var = copy; + free(*s); + *s = copy; } else { if (sscanf(param, format, var) != 1) { fprintf(stderr, "fuse: invalid parameter in option `%s'\n", arg); @@ -421,6 +417,3 @@ int fuse_opt_parse(struct fuse_args *args, void *data, fuse_opt_free_args(&ctx.outargs); return res; } - -/* This symbol version was mistakenly added to the version script */ -FUSE_SYMVER(".symver fuse_opt_insert_arg_compat,fuse_opt_insert_arg@FUSE_2.5"); |