From 037821cf99cadc12e0391dc3fc1961499a20c9fd Mon Sep 17 00:00:00 2001 From: Harold Lim Date: Tue, 17 Dec 2013 10:32:11 -0800 Subject: [PATCH] Update openvswitch to allow linking from C++ projects The input variable of ovs_scan is changed from 'template' to 'format'. template is a keyword in C++. Signed-off-by: Harold Lim Signed-off-by: Ben Pfaff --- lib/util.c | 8 ++++---- lib/util.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/util.c b/lib/util.c index 0227822f2..9f3735086 100644 --- a/lib/util.c +++ b/lib/util.c @@ -1465,7 +1465,7 @@ scan_chars(const char *s, const struct scan_spec *spec, va_list *args) /* This is an implementation of the standard sscanf() function, with the * following exceptions: * - * - It returns true if the entire template was successfully scanned and + * - It returns true if the entire format was successfully scanned and * converted, false if any conversion failed. * * - The standard doesn't define sscanf() behavior when an out-of-range value @@ -1482,15 +1482,15 @@ scan_chars(const char *s, const struct scan_spec *spec, va_list *args) * - %p is not supported. */ bool -ovs_scan(const char *s, const char *template, ...) +ovs_scan(const char *s, const char *format, ...) { const char *const start = s; bool ok = false; const char *p; va_list args; - va_start(args, template); - p = template; + va_start(args, format); + p = format; while (*p != '\0') { struct scan_spec spec; unsigned char c = *p++; diff --git a/lib/util.h b/lib/util.h index 975d1a9e0..2fb97d20c 100644 --- a/lib/util.h +++ b/lib/util.h @@ -296,7 +296,7 @@ str_to_ullong(const char *s, int base, unsigned long long *ull) return str_to_llong(s, base, (long long *) ull); } -bool ovs_scan(const char *s, const char *template, ...) SCANF_FORMAT(2, 3); +bool ovs_scan(const char *s, const char *format, ...) SCANF_FORMAT(2, 3); bool str_to_double(const char *, double *); -- 2.43.0