Replaced usage of variable 'message_tag'
with struct config item 'message_tag'. Original variable removed.

Signed-off-by: Peter Schneider <pe...@psch.de>
---
 phc2sys.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/phc2sys.c b/phc2sys.c
index 7d5edad..b402575 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1338,7 +1338,7 @@ static void usage(char *progname)
 
 int main(int argc, char *argv[])
 {
-       char *progname, *message_tag = NULL;
+       char *progname;
        char *src_name = NULL, *dst_name = NULL;
        struct clock *src, *dst;
        struct config *cfg;
@@ -1487,7 +1487,9 @@ int main(int argc, char *argv[])
                        }
                        break;
                case 't':
-                       message_tag = optarg;
+                       if (config_set_string(cfg, "message_tag", optarg)) {
+                               goto end;
+                       }
                        break;
                case 'm':
                        verbose = 1;
@@ -1531,7 +1533,7 @@ int main(int argc, char *argv[])
        }
 
        print_set_progname(progname);
-       print_set_tag(message_tag);
+       print_set_tag(config_get_string(cfg, NULL, "message_tag"));
        print_set_verbose(verbose);
        print_set_syslog(use_syslog);
        print_set_level(config_get_int(cfg, NULL, "logging_level"));
-- 
2.14.3


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to