/*
 * Copyright (C) 2007
 *  Jacob Berkman
 * Copyright (C) 2008
 *  Ludovic Rousseau <ludovic.rousseau@free.fr>
 */

#ifndef LASSERT_H
#define LASSERT_H

#include <stdio.h>
#include <stdlib.h>

#if 0
#define FAIL exit (1)
#else
#define FAIL return 1
#endif

#define LASSERT(cond)                                                   \
    ({                                                                  \
        if (cond)                                                       \
            ;                                                           \
        else {                                                          \
            fprintf (stderr, "%s:%d: assertion FAILED: " #cond "\n",    \
                     __FILE__, __LINE__);                               \
            FAIL;                                                       \
        }                                                               \
    })

#define LASSERTF(cond, fmt, a...)                                       \
    ({                                                                  \
        if (cond)                                                       \
            ;                                                           \
        else {                                                          \
            fprintf (stderr, "%s:%d: assertion FAILED: " #cond ": " fmt, \
                     __FILE__, __LINE__, ## a);                         \
            FAIL;                                                       \
        }                                                               \
    })

#endif /* LASSERT_H */

/*
 * Copyright (C) 2007
 *  Jacob Berkman
 * Copyright (C) 2008
 *  Ludovic Rousseau <ludovic.rousseau@free.fr>
 */

#ifndef LASSERT_H
#define LASSERT_H

#include <stdio.h>
#include <stdlib.h>

#if 0
#define FAIL exit (1)
#else
#define FAIL return 1
#endif

#define LASSERT(cond)                                                   \
    ({                                                                  \
        if (! (cond))                                                     \
        {                                                               \
            fprintf (stderr, "%s:%d: assertion FAILED: " #cond "\n",    \
                     __FILE__, __LINE__);                               \
            FAIL;                                                       \
        }                                                               \
    })

#define LASSERTF(cond, fmt, a...)                                       \
    ({                                                                  \
        if (! (cond))                                                     \
        {                                                               \
            fprintf (stderr, "%s:%d: assertion FAILED: " #cond ": " fmt, \
                     __FILE__, __LINE__, ## a);                         \
            FAIL;                                                       \
        }                                                               \
    })

#endif /* LASSERT_H */

Fix splint error src/pcsc-wirecheck-dist.c:19:164: Body of if clause of if statement is empty
Fix splint error
src/pcsc-wirecheck-dist.c:19:164: Body of if clause of if statement is empty


git-svn-id: f2d781e409b7e36a714fc884bb9b2fc5091ddd28@4755 0ce88b0d-b2fd-0310-8134-9614164e65ea
