[spice-gtk,1/2] spice-widget-egl: Use sizeof instead of hand coded constant

Submitted by Frediano Ziglio on July 22, 2019, 11:25 a.m.

Details

Message ID 20190722112600.1338-1-fziglio@redhat.com
State Accepted
Commit 902cf95efda15572497efcef199c9faaf200affb
Headers show
Series "Series without cover letter" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio July 22, 2019, 11:25 a.m.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 src/spice-widget-egl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
index 7bae4e58..7db66082 100644
--- a/src/spice-widget-egl.c
+++ b/src/spice-widget-egl.c
@@ -129,7 +129,7 @@  static gboolean spice_egl_init_shaders(SpiceDisplay *display, GError **err)
     glLinkProgram(d->egl.prog);
     glGetProgramiv(d->egl.prog, GL_LINK_STATUS, &status);
     if (!status) {
-        glGetProgramInfoLog(d->egl.prog, 1000, &len, log);
+        glGetProgramInfoLog(d->egl.prog, sizeof(log), &len, log);
         g_set_error(err, SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
                     "error linking shaders: %s", log);
         goto end;

Comments

Acked-by: Snir Sheriber <ssheribe@redhat.com>

On 7/22/19 2:25 PM, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
> ---
>   src/spice-widget-egl.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
> index 7bae4e58..7db66082 100644
> --- a/src/spice-widget-egl.c
> +++ b/src/spice-widget-egl.c
> @@ -129,7 +129,7 @@ static gboolean spice_egl_init_shaders(SpiceDisplay *display, GError **err)
>       glLinkProgram(d->egl.prog);
>       glGetProgramiv(d->egl.prog, GL_LINK_STATUS, &status);
>       if (!status) {
> -        glGetProgramInfoLog(d->egl.prog, 1000, &len, log);
> +        glGetProgramInfoLog(d->egl.prog, sizeof(log), &len, log);
>           g_set_error(err, SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
>                       "error linking shaders: %s", log);
>           goto end;