The input variable of ovs_scan is changed from 'template' to
'format'. template is a keyword in C++.
Signed-off-by: Harold Lim <haroldl@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
/* This is an implementation of the standard sscanf() function, with the
* following exceptions:
*
/* 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
* converted, false if any conversion failed.
*
* - The standard doesn't define sscanf() behavior when an out-of-range value
* - %p is not supported.
*/
bool
* - %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;
{
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++;
while (*p != '\0') {
struct scan_spec spec;
unsigned char c = *p++;
return str_to_llong(s, base, (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 *);
bool str_to_double(const char *, double *);