summaryrefslogtreecommitdiff
path: root/upb/bindings/linux/assert.h
blob: 26d8ab642310aaa8753e421192fbed32bf0ad3f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * upb - a minimalist implementation of protocol buffers.
 *
 * Copyright (c) 2012 Google Inc.  See LICENSE for details.
 * Author: Josh Haberman <jhaberman@gmail.com>
 */

#include <linux/kernel.h>

#ifndef UPB_LINUX_ASSERT_H
#define UPB_LINUX_ASSERT_H

#ifdef NDEBUG
#define assert(x)
#else
#define assert(x) \
    if (!(x)) panic("Assertion failed: %s at %s:%d", #x, __FILE__, __LINE__);
#endif

#endif
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback