X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fgcrypt%2Fdigest.c;h=60b9569f17713aa9a6883955173d734373a2de97;hb=3a316823b971396a428f020f401b9fe41252d98d;hp=9ebffba3dc57bf1895fb7e194be7855e20d6127a;hpb=d917c8cb6b69475d568ccbe82389b9f2b3eb5e80;p=tinc diff --git a/src/gcrypt/digest.c b/src/gcrypt/digest.c index 9ebffba3..60b9569f 100644 --- a/src/gcrypt/digest.c +++ b/src/gcrypt/digest.c @@ -1,6 +1,6 @@ /* digest.c -- Digest handling - Copyright (C) 2007 Guus Sliepen + Copyright (C) 2007-2012 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -37,7 +37,7 @@ static struct { static bool nametodigest(const char *name, int *algo) { int i; - for(i = 0; i < sizeof digesttable / sizeof *digesttable; i++) { + for(i = 0; i < sizeof(digesttable) / sizeof *digesttable; i++) { if(digesttable[i].name && !strcasecmp(name, digesttable[i].name)) { *algo = digesttable[i].algo; return true; @@ -50,7 +50,7 @@ static bool nametodigest(const char *name, int *algo) { static bool nidtodigest(int nid, int *algo) { int i; - for(i = 0; i < sizeof digesttable / sizeof *digesttable; i++) { + for(i = 0; i < sizeof(digesttable) / sizeof *digesttable; i++) { if(nid == digesttable[i].nid) { *algo = digesttable[i].algo; return true; @@ -63,7 +63,7 @@ static bool nidtodigest(int nid, int *algo) { static bool digesttonid(int algo, int *nid) { int i; - for(i = 0; i < sizeof digesttable / sizeof *digesttable; i++) { + for(i = 0; i < sizeof(digesttable) / sizeof *digesttable; i++) { if(algo == digesttable[i].algo) { *nid = digesttable[i].nid; return true;