mirror of
https://github.com/libfuse/libfuse.git
synced 2026-07-07 14:47:41 +08:00
lib/fuse_opt: fix cppcheck warnings
- Reduce scope of 'arglen' variable - Mark 'param' as const pointer Fixes cppcheck warnings: - cppcheck-variableScope - cppcheck-constVariablePointer Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
This commit is contained in:
+2
-2
@@ -170,10 +170,10 @@ static int call_proc(struct fuse_opt_context *ctx, const char *arg, int key,
|
||||
|
||||
static int match_template(const char *t, const char *arg, unsigned *sepp)
|
||||
{
|
||||
int arglen = strlen(arg);
|
||||
const char *sep = strchr(t, '=');
|
||||
sep = sep ? sep : strchr(t, ' ');
|
||||
if (sep && (!sep[1] || sep[1] == '%')) {
|
||||
int arglen = strlen(arg);
|
||||
int tlen = sep - t;
|
||||
if (sep[0] == '=')
|
||||
tlen ++;
|
||||
@@ -253,7 +253,7 @@ static int process_opt_sep_arg(struct fuse_opt_context *ctx,
|
||||
{
|
||||
int res;
|
||||
char *newarg;
|
||||
char *param;
|
||||
const char *param;
|
||||
|
||||
if (next_arg(ctx, arg) == -1)
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user