From 28b2c0edb26b36d746ad03c7ef93d5a408323a00 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Wed, 1 Apr 2009 16:44:09 -0700 Subject: [PATCH] Fix reading wrong value when bad file provided. When a non-existent config file is specified, we print an error message. Unfortunately, this was attempting to read the filename from the wrong variable, so a random pointer was being treated as a string. --- vswitchd/brcompatd.c | 2 +- vswitchd/vswitchd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vswitchd/brcompatd.c b/vswitchd/brcompatd.c index c74e4f10..6e8b18c1 100644 --- a/vswitchd/brcompatd.c +++ b/vswitchd/brcompatd.c @@ -675,7 +675,7 @@ parse_options(int argc, char *argv[]) error = cfg_set_file(config_file); if (error) { ofp_fatal(error, "failed to add configuration file \"%s\"", - optarg); + config_file); } } diff --git a/vswitchd/vswitchd.c b/vswitchd/vswitchd.c index ce0d68e0..669a8c42 100644 --- a/vswitchd/vswitchd.c +++ b/vswitchd/vswitchd.c @@ -192,7 +192,7 @@ parse_options(int argc, char *argv[]) error = cfg_set_file(config_file); if (error) { ofp_fatal(error, "failed to add configuration file \"%s\"", - optarg); + config_file); } } -- 2.30.2