From 1a0ab62094e3228bee25c13db900b0ec294222ab Mon Sep 17 00:00:00 2001 From: guenther Date: Sun, 20 Jul 2014 04:22:34 +0000 Subject: [PATCH] From ISO/IEC 9899:1999 and 9899:201x, 6.11.5 - Storage-class specifiers: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Diff from Jean-Philippe Ouellet (jean-philippe (at) ouellet.biz) --- lib/libc/crypt/bcrypt.c | 6 +++--- lib/libc/hash/sha2.c | 14 +++++++------- lib/libc/net/res_random.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/libc/crypt/bcrypt.c b/lib/libc/crypt/bcrypt.c index aab26fe2cb0..9b0001de0f9 100644 --- a/lib/libc/crypt/bcrypt.c +++ b/lib/libc/crypt/bcrypt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcrypt.c,v 1.44 2014/05/17 15:18:06 chl Exp $ */ +/* $OpenBSD: bcrypt.c,v 1.45 2014/07/20 04:22:34 guenther Exp $ */ /* * Copyright (c) 2014 Ted Unangst @@ -231,10 +231,10 @@ bcrypt_checkpass(const char *pass, const char *goodhash) /* * internal utilities */ -const static u_int8_t Base64Code[] = +static const u_int8_t Base64Code[] = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; -const static u_int8_t index_64[128] = { +static const u_int8_t index_64[128] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, diff --git a/lib/libc/hash/sha2.c b/lib/libc/hash/sha2.c index df13f0e67e9..e8216dfb4fc 100644 --- a/lib/libc/hash/sha2.c +++ b/lib/libc/hash/sha2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sha2.c,v 1.17 2014/01/08 06:14:57 tedu Exp $ */ +/* $OpenBSD: sha2.c,v 1.18 2014/07/20 04:22:34 guenther Exp $ */ /* * FILE: sha2.c @@ -171,7 +171,7 @@ /*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/ /* Hash constant words K for SHA-224 and SHA-256: */ -const static u_int32_t K256[64] = { +static const u_int32_t K256[64] = { 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL, @@ -191,7 +191,7 @@ const static u_int32_t K256[64] = { }; /* Initial hash value H for SHA-224: */ -const static u_int32_t sha224_initial_hash_value[8] = { +static const u_int32_t sha224_initial_hash_value[8] = { 0xc1059ed8UL, 0x367cd507UL, 0x3070dd17UL, @@ -203,7 +203,7 @@ const static u_int32_t sha224_initial_hash_value[8] = { }; /* Initial hash value H for SHA-256: */ -const static u_int32_t sha256_initial_hash_value[8] = { +static const u_int32_t sha256_initial_hash_value[8] = { 0x6a09e667UL, 0xbb67ae85UL, 0x3c6ef372UL, @@ -215,7 +215,7 @@ const static u_int32_t sha256_initial_hash_value[8] = { }; /* Hash constant words K for SHA-384 and SHA-512: */ -const static u_int64_t K512[80] = { +static const u_int64_t K512[80] = { 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL, @@ -259,7 +259,7 @@ const static u_int64_t K512[80] = { }; /* Initial hash value H for SHA-512 */ -const static u_int64_t sha512_initial_hash_value[8] = { +static const u_int64_t sha512_initial_hash_value[8] = { 0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 0x3c6ef372fe94f82bULL, @@ -272,7 +272,7 @@ const static u_int64_t sha512_initial_hash_value[8] = { #if !defined(SHA2_SMALL) /* Initial hash value H for SHA-384 */ -const static u_int64_t sha384_initial_hash_value[8] = { +static const u_int64_t sha384_initial_hash_value[8] = { 0xcbbb9d5dc1059ed8ULL, 0x629a292a367cd507ULL, 0x9159015a3070dd17ULL, diff --git a/lib/libc/net/res_random.c b/lib/libc/net/res_random.c index e22771995ab..f28692f7c2a 100644 --- a/lib/libc/net/res_random.c +++ b/lib/libc/net/res_random.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_random.c,v 1.20 2013/11/12 07:00:24 deraadt Exp $ */ +/* $OpenBSD: res_random.c,v 1.21 2014/07/20 04:22:34 guenther Exp $ */ /* * Copyright 1997 Niels Provos @@ -87,7 +87,7 @@ struct prf_ctx { }; #define PFAC_N 3 -const static u_int16_t pfacts[PFAC_N] = { +static const u_int16_t pfacts[PFAC_N] = { 2, 3, 2729 -- 2.20.1