Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/librumpuser Wrap DOCALL and DOCALL_KLOCK in a new block ...



details:   https://anonhg.NetBSD.org/src/rev/ea95bbbdd93d
branches:  trunk
changeset: 753277:ea95bbbdd93d
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Mar 22 09:39:02 2010 +0000

description:
Wrap DOCALL and DOCALL_KLOCK in a new block (for easy adding of
debug prints before them.

XXX: can't use the standard do-while0 because lint doesn't like it.

diffstat:

 lib/librumpuser/rumpuser_int.h |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r a8fb3ba30d60 -r ea95bbbdd93d lib/librumpuser/rumpuser_int.h
--- a/lib/librumpuser/rumpuser_int.h    Mon Mar 22 09:31:24 2010 +0000
+++ b/lib/librumpuser/rumpuser_int.h    Mon Mar 22 09:39:02 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpuser_int.h,v 1.1 2010/02/26 18:54:20 pooka Exp $   */
+/*     $NetBSD: rumpuser_int.h,v 1.2 2010/03/22 09:39:02 pooka Exp $   */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -40,15 +40,18 @@
 } while (/*CONSTCOND*/0)
 
 #define DOCALL(rvtype, call)                                           \
+{                                                                      \
        rvtype rv;                                                      \
        rv = call;                                                      \
        if (rv == -1)                                                   \
                *error = errno;                                         \
        else                                                            \
                *error = 0;                                             \
-       return rv;
+       return rv;                                                      \
+}
 
 #define DOCALL_KLOCK(rvtype, call)                                     \
+{                                                                      \
        rvtype rv;                                                      \
        int nlocks;                                                     \
        rumpuser__kunlock(0, &nlocks);                                  \
@@ -58,4 +61,5 @@
                *error = errno;                                         \
        else                                                            \
                *error = 0;                                             \
-       return rv;
+       return rv;                                                      \
+}



Home | Main Index | Thread Index | Old Index