]> tinc-vpn.org Git - tinc/blobdiff - src/gcrypt/digest.c
Fix invitation tests if port 655 is available.
[tinc] / src / gcrypt / digest.c
index ac5dc744fa152c7b9de65658f2d0f38d645d42e9..fce48ee26944e89c154780de0dbd4e1b10b0a80e 100644 (file)
@@ -37,7 +37,7 @@ static struct {
 static bool nametodigest(const char *name, int *algo) {
        int i;
 
 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;
                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;
 
 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;
                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;
 
 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;
                if(algo == digesttable[i].algo) {
                        *nid = digesttable[i].nid;
                        return true;