summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn
diff options
context:
space:
mode:
authorderaadt <>2014-06-27 06:07:35 +0000
committerderaadt <>2014-06-27 06:07:35 +0000
commitfd6338db9db0aa87673a9fb6d1abc0ebb4507099 (patch)
treea15b222a92fe994ec9b207cf12743f2f3cb61fa8 /src/lib/libcrypto/bn
parent83921e06b0fd7ce1393248d64f8cd3b5265d9790 (diff)
downloadopenbsd-fd6338db9db0aa87673a9fb6d1abc0ebb4507099.tar.gz
openbsd-fd6338db9db0aa87673a9fb6d1abc0ebb4507099.tar.bz2
openbsd-fd6338db9db0aa87673a9fb6d1abc0ebb4507099.zip
hand-KNF macro the do { } while loops
Diffstat (limited to 'src/lib/libcrypto/bn')
-rw-r--r--src/lib/libcrypto/bn/bn.h3
-rw-r--r--src/lib/libcrypto/bn/bn_ctx.c24
2 files changed, 16 insertions, 11 deletions
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h
index ca2d69c705..155adf4fe0 100644
--- a/src/lib/libcrypto/bn/bn.h
+++ b/src/lib/libcrypto/bn/bn.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn.h,v 1.23 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn.h,v 1.24 2014/06/27 06:07:35 deraadt Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -346,6 +346,7 @@ int BN_GENCB_call(BN_GENCB *cb, int a, int b);
346 _tmp_bn->top = 0; \ 346 _tmp_bn->top = 0; \
347 _tmp_bn->neg = 0; \ 347 _tmp_bn->neg = 0; \
348 } while(0) 348 } while(0)
349
349#ifdef OPENSSL_NO_DEPRECATED 350#ifdef OPENSSL_NO_DEPRECATED
350#define BN_zero(a) BN_zero_ex(a) 351#define BN_zero(a) BN_zero_ex(a)
351#else 352#else
diff --git a/src/lib/libcrypto/bn/bn_ctx.c b/src/lib/libcrypto/bn/bn_ctx.c
index ed0f434e60..e3ea72516b 100644
--- a/src/lib/libcrypto/bn/bn_ctx.c
+++ b/src/lib/libcrypto/bn/bn_ctx.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_ctx.c,v 1.9 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_ctx.c,v 1.10 2014/06/27 06:07:35 deraadt Exp $ */
2/* Written by Ulf Moeller for the OpenSSL project. */ 2/* Written by Ulf Moeller for the OpenSSL project. */
3/* ==================================================================== 3/* ====================================================================
4 * Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved. 4 * Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved.
@@ -179,15 +179,19 @@ ctxdbg(BN_CTX *ctx)
179 } 179 }
180 fprintf(stderr, "\n"); 180 fprintf(stderr, "\n");
181} 181}
182#define CTXDBG_ENTRY(str, ctx) do { \ 182#define CTXDBG_ENTRY(str, ctx) \
183 ctxdbg_cur = (str); \ 183 do { \
184 fprintf(stderr,"Starting %s\n", ctxdbg_cur); \ 184 ctxdbg_cur = (str); \
185 ctxdbg(ctx); \ 185 fprintf(stderr, "Starting %s\n", ctxdbg_cur); \
186 } while(0) 186 ctxdbg(ctx); \
187#define CTXDBG_EXIT(ctx) do { \ 187 } while(0)
188 fprintf(stderr,"Ending %s\n", ctxdbg_cur); \ 188
189 ctxdbg(ctx); \ 189#define CTXDBG_EXIT(ctx) \
190 } while(0) 190 do { \
191 fprintf(stderr, "Ending %s\n", ctxdbg_cur); \
192 ctxdbg(ctx); \
193 } while(0)
194
191#define CTXDBG_RET(ctx,ret) 195#define CTXDBG_RET(ctx,ret)
192#else 196#else
193#define CTXDBG_ENTRY(str, ctx) 197#define CTXDBG_ENTRY(str, ctx)