> > mingw does not provide memmem. Since the qmp data is JSON, it won't > contain embedded nul characters, we can use g_strstr_len instead of g_strstr_len -> strstr > memmem. > > Signed-off-by: Christophe Fergeau <cfergeau@xxxxxxxxxx> > --- > > Changes since v1: > - rework commit log > - use strstr instead of g_strstr_len > > src/qmp-port.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/qmp-port.c b/src/qmp-port.c > index c91f967a..7726af4e 100644 > --- a/src/qmp-port.c > +++ b/src/qmp-port.c > @@ -160,7 +160,7 @@ spice_qmp_handle_port_data(SpiceQmpPort *self, gpointer > data, > } > > str = qmp->str; > - while ((crlf = memmem(str, qmp->len - (str - qmp->str), "\r\n", 2))) { > + while ((crlf = strstr(str, "\r\n"))) { != NULL > GError *err = NULL; > > *crlf = '\0'; Otherwise, Acked-by: Frediano Ziglio <fziglio@xxxxxxxxxx> Frediano _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel