From cc8d8f72de9d30beb1331ecedfa3b329cb4b36f9 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 8 Jan 2020 22:30:38 +0100 Subject: Drawable.c: get rid of goto code in nxagentSynchronizeDrawableData Now all cleanup code at the end of the function is gone so there's no need for the gotos anymore. Just return directly. --- nx-X11/programs/Xserver/hw/nxagent/Drawable.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Drawable.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c index 5527e5d67..6068b16bf 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c @@ -245,8 +245,6 @@ static int reallySynchronizeDrawableData(DrawablePtr pDrawable) int nxagentSynchronizeDrawableData(DrawablePtr pDrawable, unsigned int breakMask, WindowPtr owner) { - int success; - if (pDrawable -> type == DRAWABLE_PIXMAP) { /* @@ -261,9 +259,7 @@ int nxagentSynchronizeDrawableData(DrawablePtr pDrawable, unsigned int breakMask __func__, (void *) pDrawable); #endif - success = reallySynchronizeDrawableData(pDrawable); - - goto nxagentSynchronizeDrawableDataEnd; + return reallySynchronizeDrawableData(pDrawable); } else if (nxagentReconnectTrap == 1) { @@ -291,9 +287,7 @@ int nxagentSynchronizeDrawableData(DrawablePtr pDrawable, unsigned int breakMask } #endif - success = reallySynchronizeDrawableData(pDrawable); - - goto nxagentSynchronizeDrawableDataEnd; + return reallySynchronizeDrawableData(pDrawable); } else { @@ -304,9 +298,7 @@ int nxagentSynchronizeDrawableData(DrawablePtr pDrawable, unsigned int breakMask nxagentMarkCorruptedRegion(pDrawable, NullRegion); - success = 1; - - goto nxagentSynchronizeDrawableDataEnd; + return 1; } } } @@ -317,11 +309,7 @@ int nxagentSynchronizeDrawableData(DrawablePtr pDrawable, unsigned int breakMask * the drawable. */ - success = nxagentSynchronizeRegion(pDrawable, NullRegion, breakMask, owner); - -nxagentSynchronizeDrawableDataEnd: - - return success; + return nxagentSynchronizeRegion(pDrawable, NullRegion, breakMask, owner); } /* -- cgit v1.2.3