summaryrefslogtreecommitdiff
path: root/contrib/ivshmem-server/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ivshmem-server/main.c')
-rw-r--r--contrib/ivshmem-server/main.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/contrib/ivshmem-server/main.c b/contrib/ivshmem-server/main.c
index 54ff001c23..9b0d6e2319 100644
--- a/contrib/ivshmem-server/main.c
+++ b/contrib/ivshmem-server/main.c
@@ -65,7 +65,7 @@ ivshmem_server_parse_args(IvshmemServerArgs *args, int argc, char *argv[])
{
int c;
unsigned long long v;
- Error *errp = NULL;
+ Error *err = NULL;
while ((c = getopt(argc, argv,
"h" /* help */
@@ -104,11 +104,9 @@ ivshmem_server_parse_args(IvshmemServerArgs *args, int argc, char *argv[])
break;
case 'l': /* shm_size */
- parse_option_size("shm_size", optarg, &args->shm_size, &errp);
- if (errp) {
- fprintf(stderr, "cannot parse shm size: %s\n",
- error_get_pretty(errp));
- error_free(errp);
+ parse_option_size("shm_size", optarg, &args->shm_size, &err);
+ if (err) {
+ error_report_err(err);
ivshmem_server_usage(argv[0], 1);
}
break;