summaryrefslogtreecommitdiff
path: root/lib/clippy.c
diff options
context:
space:
mode:
authorwhitespace / reindent <invalid@invalid.invalid>2017-07-17 14:03:14 +0200
committerwhitespace / reindent <invalid@invalid.invalid>2017-07-17 14:04:07 +0200
commitd62a17aedeb0eebdba98238874bb13d62c48dbf9 (patch)
tree3b319b1d61c8b85b4d1f06adf8b844bb8a9b5107 /lib/clippy.c
parent888ac268a0077fc9ebd1218cec6ae472af0bfc40 (diff)
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/clippy.c')
-rw-r--r--lib/clippy.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/lib/clippy.c b/lib/clippy.c
index 26ef246573..bcec6c2cca 100644
--- a/lib/clippy.c
+++ b/lib/clippy.c
@@ -75,8 +75,9 @@ int main(int argc, char **argv)
*cr = ' ';
fprintf(stderr, "clippy interactive shell\n(Python %s)\n", ver);
free(ver);
- PyRun_SimpleString("import rlcompleter, readline\n"
- "readline.parse_and_bind('tab: complete')");
+ PyRun_SimpleString(
+ "import rlcompleter, readline\n"
+ "readline.parse_and_bind('tab: complete')");
}
if (PyRun_AnyFile(fp, pyfile)) {
@@ -86,7 +87,7 @@ int main(int argc, char **argv)
printf("unknown python failure (?)\n");
return 1;
}
- Py_Finalize();
+ Py_Finalize();
#if PY_MAJOR_VERSION >= 3
for (int i = 1; i < argc; i++)
@@ -106,15 +107,15 @@ int main(int argc, char **argv)
#include "log.h"
#include "zassert.h"
-#define ZLOG_FUNC(FUNCNAME) \
-void FUNCNAME(const char *format, ...) \
-{ \
- va_list args; \
- va_start(args, format); \
- vfprintf (stderr, format, args); \
- fputs ("\n", stderr); \
- va_end(args); \
-}
+#define ZLOG_FUNC(FUNCNAME) \
+ void FUNCNAME(const char *format, ...) \
+ { \
+ va_list args; \
+ va_start(args, format); \
+ vfprintf(stderr, format, args); \
+ fputs("\n", stderr); \
+ va_end(args); \
+ }
ZLOG_FUNC(zlog_err)
ZLOG_FUNC(zlog_warn)
@@ -122,16 +123,16 @@ ZLOG_FUNC(zlog_info)
ZLOG_FUNC(zlog_notice)
ZLOG_FUNC(zlog_debug)
-void
-_zlog_assert_failed (const char *assertion, const char *file,
- unsigned int line, const char *function)
+void _zlog_assert_failed(const char *assertion, const char *file,
+ unsigned int line, const char *function)
{
- fprintf(stderr, "Assertion `%s' failed in file %s, line %u, function %s",
+ fprintf(stderr,
+ "Assertion `%s' failed in file %s, line %u, function %s",
assertion, file, line, (function ? function : "?"));
abort();
}
-void memory_oom (size_t size, const char *name)
+void memory_oom(size_t size, const char *name)
{
abort();
}