diff options
| author | horwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-03-01 22:06:08 +0000 |
|---|---|---|
| committer | horwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-03-01 22:06:08 +0000 |
| commit | 8a742fb958743850f8d9cd60f22f97f0bd896d0d (patch) | |
| tree | 87e10ab6ac93cef687f44080d42b34d0e37dda6b /navit/command.c | |
| parent | 05eb9f16f33fd34ef49797944bbd039983df7f44 (diff) | |
| download | navit-8a742fb958743850f8d9cd60f22f97f0bd896d0d.tar.gz | |
fix:core:fix handling of error number
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2976 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/command.c')
| -rw-r--r-- | navit/command.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/navit/command.c b/navit/command.c index 6872522f8..12d5d7d77 100644 --- a/navit/command.c +++ b/navit/command.c @@ -754,7 +754,7 @@ command_evaluate_to(struct attr *attr, char *expr, struct context *ctx, struct r } void -command_evaluate_to_void(struct attr *attr, char *expr, int **error) +command_evaluate_to_void(struct attr *attr, char *expr, int *error) { struct result res; struct context ctx; @@ -762,12 +762,12 @@ command_evaluate_to_void(struct attr *attr, char *expr, int **error) if (!ctx.error) resolve(&ctx, &res, NULL); if (error) - *error=&ctx.error; + *error=ctx.error; } char * -command_evaluate_to_string(struct attr *attr, char *expr, int **error) +command_evaluate_to_string(struct attr *attr, char *expr, int *error) { struct result res; struct context ctx; @@ -779,7 +779,7 @@ command_evaluate_to_string(struct attr *attr, char *expr, int **error) if (!ctx.error) ret=get_string(&ctx, &res); if (error) - *error=&ctx.error; + *error=ctx.error; if (ctx.error) return NULL; else @@ -787,7 +787,7 @@ command_evaluate_to_string(struct attr *attr, char *expr, int **error) } int -command_evaluate_to_int(struct attr *attr, char *expr, int **error) +command_evaluate_to_int(struct attr *attr, char *expr, int *error) { struct result res; struct context ctx; @@ -799,7 +799,7 @@ command_evaluate_to_int(struct attr *attr, char *expr, int **error) if (!ctx.error) ret=get_int(&ctx, &res); if (error) - *error=&ctx.error; + *error=ctx.error; if (ctx.error) return 0; else @@ -807,7 +807,7 @@ command_evaluate_to_int(struct attr *attr, char *expr, int **error) } int -command_evaluate_to_boolean(struct attr *attr, char *expr, int **error) +command_evaluate_to_boolean(struct attr *attr, char *expr, int *error) { struct result res; struct context ctx; @@ -826,7 +826,7 @@ command_evaluate_to_boolean(struct attr *attr, char *expr, int **error) ret=res.attr.u.data != NULL; } if (error) - *error=&ctx.error; + *error=ctx.error; if (ctx.error) return 0; else |
