On 10/28/2012 12:27 PM, walter harms wrote:


Am 28.10.2012 04:01, schrieb Yaakov (Cygwin/X):
From: Yaakov Selkowitz <yselkow...@users.sourceforge.net>

Signed-off-by: Yaakov Selkowitz <yselkow...@users.sourceforge.net>
---
  render/picturestr.h |    8 ++++----
  1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/render/picturestr.h b/render/picturestr.h
index dc00f41..5644f28 100644
--- a/render/picturestr.h
+++ b/render/picturestr.h
@@ -363,10 +363,10 @@ extern _X_EXPORT RESTYPE GlyphSetType;
  #define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, 
PictureWindowPrivateKey, p)

  #define VERIFY_PICTURE(pPicture, pid, client, mode) {\
-    int rc = dixLookupResourceByType((pointer)&(pPicture), pid,\
-                                    PictureType, client, mode);\
-    if (rc != Success)\
-       return rc;\
+    int tmprc = dixLookupResourceByType((pointer)&(pPicture), pid,\
+                                       PictureType, client, mode);\
+    if (tmprc != Success)\
+       return tmprc;\
  }

  #define VERIFY_ALPHA(pPicture, pid, client, mode) {\

This looks like a function. Is there a serous reason why this is a macro ?

It's a macro so it can cause the calling function to return, making the callers shorter at the expense of making the codebase more cryptic.

-- Aaron
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to