Message ID | 20190220010232.18731-8-philmd@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | chardev: Convert qemu_chr_write() to take a size_t argument | expand |
On Wed, Feb 20, 2019 at 2:04 AM Philippe Mathieu-Daudé <philmd@redhat.com> wrote: > > All callers provide a size_t argument, we can safely use size_t > for this function. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> > --- > gdbstub.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gdbstub.c b/gdbstub.c > index 69340d7cd1..860e9bb7c7 100644 > --- a/gdbstub.c > +++ b/gdbstub.c > @@ -475,10 +475,10 @@ static int gdb_continue_partial(GDBState *s, char *newstates) > return res; > } > > -static void put_buffer(GDBState *s, const uint8_t *buf, int len) > +static void put_buffer(GDBState *s, const uint8_t *buf, size_t len) > { > #ifdef CONFIG_USER_ONLY > - int ret; > + ssize_t ret; > > while (len > 0) { > ret = send(s->fd, buf, len, 0); > -- > 2.20.1 >
diff --git a/gdbstub.c b/gdbstub.c index 69340d7cd1..860e9bb7c7 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -475,10 +475,10 @@ static int gdb_continue_partial(GDBState *s, char *newstates) return res; } -static void put_buffer(GDBState *s, const uint8_t *buf, int len) +static void put_buffer(GDBState *s, const uint8_t *buf, size_t len) { #ifdef CONFIG_USER_ONLY - int ret; + ssize_t ret; while (len > 0) { ret = send(s->fd, buf, len, 0);
All callers provide a size_t argument, we can safely use size_t for this function. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- gdbstub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)