rather than adding braces in the code, define the offending macro

to "(void)0". This is what similar code in bind9 (up to 9.5) does.
(native NetBSD code usually does "do { } while (/* CONSTCOND */ 0)"
in this case)
Anyway, I've checked the code, didn't find ambiguities due to
the empty statements, so the whole thing is harmless.
This commit is contained in:
drochner 2010-01-26 19:11:00 +00:00
parent 54b3dc4108
commit ae6fdb5ce4
3 changed files with 7 additions and 11 deletions

View File

@ -1,5 +1,5 @@
#ifndef LINT
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/dst_api.c,v 1.6 2010/01/25 20:33:57 drochner Exp $";
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/dst_api.c,v 1.7 2010/01/26 19:11:00 drochner Exp $";
#endif
/*
@ -684,10 +684,9 @@ dst_dnskey_to_key(const char *in_name,
if (key_st->dk_func->from_dns_key(key_st, &rdata[start],
len - start) > 0)
return (key_st);
} else {
} else
EREPORT(("dst_dnskey_to_public_key(): unsuppored alg %d\n",
alg));
}
SAFE_FREE(key_st);
return (key_st);
@ -746,10 +745,9 @@ dst_key_to_dnskey(const DST_KEY *key, u_char *out_storage,
return (enc_len + loc);
else
return (-1);
} else {
} else
EREPORT(("dst_key_to_dnskey(): Unsupported ALG %d\n",
key->dk_alg));
}
return (-1);
}
@ -879,11 +877,10 @@ dst_s_read_private_key_file(char *name, DST_KEY *pk_key, unsigned in_id,
EREPORT(("dst_s_read_private_key_file(): Unknown keyfile %d.%d version for %s\n",
file_major, file_minor, name));
goto fail;
} else if (file_major > major || file_minor > minor) {
} else if (file_major > major || file_minor > minor)
EREPORT((
"dst_s_read_private_key_file(): Keyfile %s version higher than mine %d.%d MAY FAIL\n",
name, file_major, file_minor));
}
while (*p++ != '\n') ; /* skip to end of line */

View File

@ -60,7 +60,7 @@ typedef struct dst_key {
#ifdef REPORT_ERRORS
#define EREPORT(str) printf str
#else
#define EREPORT(str)
#define EREPORT(str) (void)0
#endif
/* use our own special macro to FRRE memory */

View File

@ -1,5 +1,5 @@
#ifndef LINT
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/prandom.c,v 1.5 2010/01/25 20:33:57 drochner Exp $";
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/prandom.c,v 1.6 2010/01/26 19:11:00 drochner Exp $";
#endif
/*
* Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc.
@ -850,9 +850,8 @@ dst_s_semi_random(u_char *output, unsigned size)
i = dst_sign_data(SIG_MODE_ALL, my_key, NULL,
(u_char *) counter, hb_size,
semi_old, sizeof(semi_old));
if (i != hb_size) {
if (i != hb_size)
EREPORT(("HMAC SIGNATURE FAILURE %d\n", i));
}
cnt++;
if (size - out < i) /* Not all data is needed */
semi_loc = i = size - out;