Commit a1879bf5 authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

Avoid conflict with C99 float conversion.

parent 9fa780a9
......@@ -704,19 +704,19 @@ static int callback_http(struct lws *wsi,
if (!strncmp(rcv, "status ", 7)) {
char *ident;
sscanf(rcv, "%*s %as", &ident);
sscanf(rcv, "%*s %ms", &ident);
start_status(wsi, ident);
} else if (!strncmp(rcv, "trace ", 6)) {
int freq;
char *variable;
sscanf(rcv, "%*s %d %as", &freq, &variable);
sscanf(rcv, "%*s %d %ms", &freq, &variable);
start_trace(wsi, freq, variable);
} else if (!strncmp(rcv, "command ", 8)) {
char *ident;
char *command;
sscanf(rcv, "%*s %as", &ident);
sscanf(rcv, "%*s %ms", &ident);
command = rcv + 8 + strlen(ident) + 1;
do_command(ident, command);
......@@ -728,7 +728,7 @@ static int callback_http(struct lws *wsi,
struct command *command;
enum command_value_type vtype;
sscanf(rcv, "%*s %as %as", &name, &type);
sscanf(rcv, "%*s %ms %ms", &name, &type);
if (!strcmp(type, "bool")) {
int v;
sscanf(rcv, "%*s %*s %*s %d", &v);
......@@ -748,7 +748,7 @@ static int callback_http(struct lws *wsi,
if (!strcmp(type, "float")) {
float v;
char *vstr;
sscanf(rcv, "%*s %*s %*s %as", &vstr);
sscanf(rcv, "%*s %*s %*s %ms", &vstr);
if (!strcmp(vstr, "TRACK")) {
entry.value.f = 0.0;
entry.type = COMMAND_PTYPE_SETPOINT_TRACK;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment