diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-01-08 22:30:38 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-05-07 12:55:04 +0200 |
commit | cc8d8f72de9d30beb1331ecedfa3b329cb4b36f9 (patch) | |
tree | 1658752e320e509474c61277f28570efe948c3a4 /nx-X11/programs/Xserver/hw/nxagent/Drawable.c | |
parent | beef0cd99e476188165425fd6516a0b02ce54a80 (diff) | |
download | nx-libs-cc8d8f72de9d30beb1331ecedfa3b329cb4b36f9.tar.gz nx-libs-cc8d8f72de9d30beb1331ecedfa3b329cb4b36f9.tar.bz2 nx-libs-cc8d8f72de9d30beb1331ecedfa3b329cb4b36f9.zip |
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.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Drawable.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Drawable.c | 20 |
1 files changed, 4 insertions, 16 deletions
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); } /* |