Re: [PATCH xserver] xwayland: replace hardcoded function name with __func__ in error msg
On Wed, Feb 08, 2017 at 02:46:16AM -0500, Olivier Fourdan wrote: > Hey Peter, > > > > LGTM - Yo get rid of two \n along the way, but I think there were not > > > needed in the first place so: > > > > oops. no, they're neeed so I added them back (and also to the instance where > > it was missing). thanks > > Are they really needed? I looked at ErrorF() in the source tree and there > are plenty of cases where there is no \n at the end, so I looked at > LogVMessageVerb() where ErrorF() should end up, and it seemed to me it > would ad it if missing: > > https://cgit.freedesktop.org/xorg/xserver/tree/os/log.c#n702 ah, true. Convenient and useful to know, thanks :) Cheers, Peter ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] xwayland: replace hardcoded function name with __func__ in error msg
Hey Peter, > > LGTM - Yo get rid of two \n along the way, but I think there were not > > needed in the first place so: > > oops. no, they're neeed so I added them back (and also to the instance where > it was missing). thanks Are they really needed? I looked at ErrorF() in the source tree and there are plenty of cases where there is no \n at the end, so I looked at LogVMessageVerb() where ErrorF() should end up, and it seemed to me it would ad it if missing: https://cgit.freedesktop.org/xorg/xserver/tree/os/log.c#n702 Anyway, it's no big deal :) Cheers, Olivier ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] xwayland: replace hardcoded function name with __func__ in error msg
On Tue, Feb 07, 2017 at 03:11:35AM -0500, Olivier Fourdan wrote: > > Signed-off-by: Peter Hutterer> > --- > > hw/xwayland/xwayland-input.c | 4 ++-- > > hw/xwayland/xwayland-output.c | 2 +- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c > > index 580df09..8d8bcbd 100644 > > --- a/hw/xwayland/xwayland-input.c > > +++ b/hw/xwayland/xwayland-input.c > > @@ -854,7 +854,7 @@ touch_handle_down(void *data, struct wl_touch *wl_touch, > > > > xwl_touch = calloc(1, sizeof *xwl_touch); > > if (xwl_touch == NULL) { > > -ErrorF("touch_handle_down ENOMEM"); > > +ErrorF("%s ENOMEM", __func__); > > return; > > } > > > > @@ -1125,7 +1125,7 @@ create_input_device(struct xwl_screen *xwl_screen, > > uint32_t id, uint32_t version > > > > xwl_seat = calloc(1, sizeof *xwl_seat); > > if (xwl_seat == NULL) { > > -ErrorF("create_input ENOMEM\n"); > > +ErrorF("%s ENOMEM", __func__); > > return; > > } > > > > diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c > > index f3ce763..17715e2 100644 > > --- a/hw/xwayland/xwayland-output.c > > +++ b/hw/xwayland/xwayland-output.c > > @@ -244,7 +244,7 @@ xwl_output_create(struct xwl_screen *xwl_screen, > > uint32_t > > id) > > > > xwl_output = calloc(1, sizeof *xwl_output); > > if (xwl_output == NULL) { > > -ErrorF("create_output ENOMEM\n"); > > +ErrorF("%s ENOMEM", __func__); > > return NULL; > > } > > > > -- > > 2.9.3 > > LGTM - Yo get rid of two \n along the way, but I think there were not needed > in the first place so: oops. no, they're neeed so I added them back (and also to the instance where it was missing). thanks Cheers, Peter ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] xwayland: replace hardcoded function name with __func__ in error msg
> Signed-off-by: Peter Hutterer> --- > hw/xwayland/xwayland-input.c | 4 ++-- > hw/xwayland/xwayland-output.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c > index 580df09..8d8bcbd 100644 > --- a/hw/xwayland/xwayland-input.c > +++ b/hw/xwayland/xwayland-input.c > @@ -854,7 +854,7 @@ touch_handle_down(void *data, struct wl_touch *wl_touch, > > xwl_touch = calloc(1, sizeof *xwl_touch); > if (xwl_touch == NULL) { > -ErrorF("touch_handle_down ENOMEM"); > +ErrorF("%s ENOMEM", __func__); > return; > } > > @@ -1125,7 +1125,7 @@ create_input_device(struct xwl_screen *xwl_screen, > uint32_t id, uint32_t version > > xwl_seat = calloc(1, sizeof *xwl_seat); > if (xwl_seat == NULL) { > -ErrorF("create_input ENOMEM\n"); > +ErrorF("%s ENOMEM", __func__); > return; > } > > diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c > index f3ce763..17715e2 100644 > --- a/hw/xwayland/xwayland-output.c > +++ b/hw/xwayland/xwayland-output.c > @@ -244,7 +244,7 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t > id) > > xwl_output = calloc(1, sizeof *xwl_output); > if (xwl_output == NULL) { > -ErrorF("create_output ENOMEM\n"); > +ErrorF("%s ENOMEM", __func__); > return NULL; > } > > -- > 2.9.3 LGTM - Yo get rid of two \n along the way, but I think there were not needed in the first place so: Reviewed-by: Olivier Fourdan ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] xwayland: replace hardcoded function name with __func__ in error msg
On Tue, 7 Feb 2017 11:47:35 +1000 Peter Huttererwrote: > Signed-off-by: Peter Hutterer > --- > hw/xwayland/xwayland-input.c | 4 ++-- > hw/xwayland/xwayland-output.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c > index 580df09..8d8bcbd 100644 > --- a/hw/xwayland/xwayland-input.c > +++ b/hw/xwayland/xwayland-input.c > @@ -854,7 +854,7 @@ touch_handle_down(void *data, struct wl_touch *wl_touch, > > xwl_touch = calloc(1, sizeof *xwl_touch); > if (xwl_touch == NULL) { > -ErrorF("touch_handle_down ENOMEM"); > +ErrorF("%s ENOMEM", __func__); > return; > } > > @@ -1125,7 +1125,7 @@ create_input_device(struct xwl_screen *xwl_screen, > uint32_t id, uint32_t version > > xwl_seat = calloc(1, sizeof *xwl_seat); > if (xwl_seat == NULL) { > -ErrorF("create_input ENOMEM\n"); > +ErrorF("%s ENOMEM", __func__); > return; > } > > diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c > index f3ce763..17715e2 100644 > --- a/hw/xwayland/xwayland-output.c > +++ b/hw/xwayland/xwayland-output.c > @@ -244,7 +244,7 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t > id) > > xwl_output = calloc(1, sizeof *xwl_output); > if (xwl_output == NULL) { > -ErrorF("create_output ENOMEM\n"); > +ErrorF("%s ENOMEM", __func__); > return NULL; > } > Reviewed-by: Pekka Paalanen Thanks, pq pgp9Ljfe1j6cH.pgp Description: OpenPGP digital signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] xwayland: replace hardcoded function name with __func__ in error msg
Signed-off-by: Peter Hutterer--- hw/xwayland/xwayland-input.c | 4 ++-- hw/xwayland/xwayland-output.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index 580df09..8d8bcbd 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -854,7 +854,7 @@ touch_handle_down(void *data, struct wl_touch *wl_touch, xwl_touch = calloc(1, sizeof *xwl_touch); if (xwl_touch == NULL) { -ErrorF("touch_handle_down ENOMEM"); +ErrorF("%s ENOMEM", __func__); return; } @@ -1125,7 +1125,7 @@ create_input_device(struct xwl_screen *xwl_screen, uint32_t id, uint32_t version xwl_seat = calloc(1, sizeof *xwl_seat); if (xwl_seat == NULL) { -ErrorF("create_input ENOMEM\n"); +ErrorF("%s ENOMEM", __func__); return; } diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index f3ce763..17715e2 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -244,7 +244,7 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id) xwl_output = calloc(1, sizeof *xwl_output); if (xwl_output == NULL) { -ErrorF("create_output ENOMEM\n"); +ErrorF("%s ENOMEM", __func__); return NULL; } -- 2.9.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel