root/nsswitch/libwbclient/wbc_err_internal.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2    Unix SMB/CIFS implementation.
   3 
   4    Winbind client API
   5 
   6    Copyright (C) Gerald (Jerry) Carter 2007
   7 
   8    This library is free software; you can redistribute it and/or
   9    modify it under the terms of the GNU Lesser General Public
  10    License as published by the Free Software Foundation; either
  11    version 3 of the License, or (at your option) any later version.
  12 
  13    This library is distributed in the hope that it will be useful,
  14    but WITHOUT ANY WARRANTY; without even the implied warranty of
  15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16    Library General Public License for more details.
  17 
  18    You should have received a copy of the GNU Lesser General Public License
  19    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  20 */
  21 
  22 #ifndef _WBC_ERR_INTERNAL_H
  23 #define _WBC_ERR_INTERNAL_H
  24 
  25 /* Private macros */
  26 
  27 #define BAIL_ON_WBC_ERROR(x)                    \
  28         do {                                    \
  29                 if (!WBC_ERROR_IS_OK(x)) {      \
  30                         goto done;              \
  31                 }                               \
  32         } while(0);
  33 
  34 #define BAIL_ON_PTR_ERROR(x, status)                    \
  35         do {                                            \
  36                 if ((x) == NULL) {                      \
  37                         status = WBC_ERR_NO_MEMORY;     \
  38                         goto done;                      \
  39                 } else {                                \
  40                         status = WBC_ERR_SUCCESS;       \
  41                 }                                       \
  42         } while (0);
  43 
  44 
  45 #endif  /* _WBC_ERR_INTERNAL_H */

/* [<][>][^][v][top][bottom][index][help] */