Commit 2f734e0a authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

sizeof style

parent 33a1b097
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-keygen.c,v 1.52 2001/09/19 00:15:05 bwelling Exp $ */
/* $Id: dnssec-keygen.c,v 1.53 2001/09/19 23:05:11 gson Exp $ */
#include <config.h>
......@@ -337,8 +337,8 @@ main(int argc, char **argv) {
if (ret != ISC_R_SUCCESS) {
char namestr[DNS_NAME_FORMATSIZE];
char algstr[ALG_FORMATSIZE];
dns_name_format(name, namestr, sizeof namestr);
alg_format(alg, algstr, sizeof algstr);
dns_name_format(name, namestr, sizeof(namestr));
alg_format(alg, algstr, sizeof(algstr));
fatal("failed to generate key %s/%s: %s\n",
namestr, algstr, dst_result_totext(ret));
exit(-1);
......@@ -380,7 +380,7 @@ main(int argc, char **argv) {
ret = dst_key_tofile(key, DST_TYPE_PUBLIC | DST_TYPE_PRIVATE, NULL);
if (ret != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(key, keystr, sizeof keystr);
key_format(key, keystr, sizeof(keystr));
fatal("failed to write key %s: %s\n", keystr,
isc_result_totext(ret));
}
......
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-makekeyset.c,v 1.56 2001/09/19 21:00:35 bwelling Exp $ */
/* $Id: dnssec-makekeyset.c,v 1.57 2001/09/19 23:05:12 gson Exp $ */
#include <config.h>
......@@ -239,7 +239,7 @@ main(int argc, char *argv[]) {
if (rdclass == 0)
rdclass = dst_key_class(key);
isc_buffer_init(&namebuf, namestr, sizeof namestr);
isc_buffer_init(&namebuf, namestr, sizeof(namestr));
result = dns_name_tofilenametext(dst_key_name(key),
ISC_FALSE,
&namebuf);
......@@ -252,7 +252,7 @@ main(int argc, char *argv[]) {
dns_name_copy(dst_key_name(key), domain, NULL);
} else if (!dns_name_equal(domain, dst_key_name(key))) {
char str[DNS_NAME_FORMATSIZE];
dns_name_format(domain, str, sizeof str);
dns_name_format(domain, str, sizeof(str));
fatal("all keys must have the same owner - %s "
"and %s do not match", str, namestr);
}
......@@ -276,8 +276,7 @@ main(int argc, char *argv[]) {
fatal("failed to read private key %s: %s",
argv[i], isc_result_totext(result));
if (!zonekey_on_list(zonekey)) {
keynode = isc_mem_get(mctx,
sizeof (keynode_t));
keynode = isc_mem_get(mctx, sizeof(keynode_t));
if (keynode == NULL)
fatal("out of memory");
keynode->key = zonekey;
......@@ -337,7 +336,7 @@ main(int argc, char *argv[]) {
isc_entropy_stopcallbacksources(ectx);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(keynode->key, keystr, sizeof keystr);
key_format(keynode->key, keystr, sizeof(keystr));
fatal("failed to sign keyset with key %s: %s",
keystr, isc_result_totext(result));
}
......@@ -347,7 +346,7 @@ main(int argc, char *argv[]) {
mctx, &rdata);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(keynode->key, keystr, sizeof keystr);
key_format(keynode->key, keystr, sizeof(keystr));
fatal("signature from key '%s' failed to "
"verify: %s",
keystr, isc_result_totext(result));
......@@ -370,7 +369,7 @@ main(int argc, char *argv[]) {
result = dns_db_dump(db, version, output);
if (result != ISC_R_SUCCESS) {
char domainstr[DNS_NAME_FORMATSIZE];
dns_name_format(domain, domainstr, sizeof domainstr);
dns_name_format(domain, domainstr, sizeof(domainstr));
fatal("failed to write database for %s to %s",
domainstr, output);
}
......
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signkey.c,v 1.53 2001/09/19 21:24:34 bwelling Exp $ */
/* $Id: dnssec-signkey.c,v 1.54 2001/09/19 23:05:13 gson Exp $ */
#include <config.h>
......@@ -121,7 +121,7 @@ loadkeys(dns_name_t *name, dns_rdataset_t *rdataset) {
dst_key_free(&key);
continue;
}
keynode = isc_mem_get(mctx, sizeof (keynode_t));
keynode = isc_mem_get(mctx, sizeof(keynode_t));
if (keynode == NULL)
fatal("out of memory");
keynode->key = key;
......@@ -324,7 +324,7 @@ main(int argc, char *argv[]) {
0, &rdataset, &sigrdataset);
if (result != ISC_R_SUCCESS) {
char domainstr[DNS_NAME_FORMATSIZE];
dns_name_format(domain, domainstr, sizeof domainstr);
dns_name_format(domain, domainstr, sizeof(domainstr));
fatal("failed to find rdataset '%s KEY': %s",
domainstr, isc_result_totext(result));
}
......@@ -347,7 +347,7 @@ main(int argc, char *argv[]) {
ISC_TRUE, mctx, &sigrdata);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(key, keystr, sizeof keystr);
key_format(key, keystr, sizeof(keystr));
fatal("signature by key '%s' did not verify: %s",
keystr, isc_result_totext(result));
}
......@@ -388,7 +388,7 @@ main(int argc, char *argv[]) {
isc_entropy_stopcallbacksources(ectx);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(key, keystr, sizeof keystr);
key_format(key, keystr, sizeof(keystr));
fatal("key '%s' failed to sign data: %s",
keystr, isc_result_totext(result));
}
......@@ -397,7 +397,7 @@ main(int argc, char *argv[]) {
ISC_TRUE, mctx, &rdata);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(key, keystr, sizeof keystr);
key_format(key, keystr, sizeof(keystr));
fatal("signature from key '%s' failed to "
"verify: %s",
keystr, isc_result_totext(result));
......
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signzone.c,v 1.141 2001/09/18 21:43:19 bwelling Exp $ */
/* $Id: dnssec-signzone.c,v 1.142 2001/09/19 23:05:14 gson Exp $ */
#include <config.h>
......@@ -168,7 +168,7 @@ signwithkey(dns_name_t *name, dns_rdataset_t *rdataset, dns_rdata_t *rdata,
isc_entropy_stopcallbacksources(ectx);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(key, keystr, sizeof keystr);
key_format(key, keystr, sizeof(keystr));
fatal("key '%s' failed to sign data: %s",
keystr, isc_result_totext(result));
}
......@@ -259,7 +259,7 @@ expecttofindkey(dns_name_t *name) {
case DNS_R_DNAME:
return (ISC_FALSE);
}
dns_name_format(name, namestr, sizeof namestr);
dns_name_format(name, namestr, sizeof(namestr));
fatal("failure looking for '%s KEY' in database: %s",
namestr, isc_result_totext(result));
return (ISC_FALSE); /* removes a warning */
......@@ -304,8 +304,8 @@ signset(dns_diff_t *diff, dns_dbnode_t *node, dns_name_t *name,
char typestr[TYPE_FORMATSIZE];
char sigstr[SIG_FORMATSIZE];
dns_name_format(name, namestr, sizeof namestr);
type_format(set->type, typestr, sizeof typestr);
dns_name_format(name, namestr, sizeof(namestr));
type_format(set->type, typestr, sizeof(typestr));
ttl = ISC_MIN(set->ttl, endtime - starttime);
......@@ -351,7 +351,7 @@ signset(dns_diff_t *diff, dns_dbnode_t *node, dns_name_t *name,
future = ISC_TF(now < sig.timesigned);
key = keythatsigned(&sig);
sig_format(&sig, sigstr, sizeof sigstr);
sig_format(&sig, sigstr, sizeof(sigstr));
if (sig.timesigned > sig.timeexpire) {
/* sig is dropped and not replaced */
......@@ -425,7 +425,7 @@ signset(dns_diff_t *diff, dns_dbnode_t *node, dns_name_t *name,
unsigned char array[BUFSIZE];
char keystr[KEY_FORMATSIZE];
key_format(key->key, keystr, sizeof keystr);
key_format(key->key, keystr, sizeof(keystr));
vbprintf(1, "\tresigning with key %s\n", keystr);
isc_buffer_init(&b, array, sizeof(array));
signwithkey(name, set, &trdata, key->key, &b);
......@@ -461,7 +461,7 @@ signset(dns_diff_t *diff, dns_dbnode_t *node, dns_name_t *name,
if (!key->isdefault || nowsignedby[key->position])
continue;
key_format(key->key, keystr, sizeof keystr);
key_format(key->key, keystr, sizeof(keystr));
vbprintf(1, "\tsigning with key %s\n", keystr);
dns_rdata_init(&trdata);
isc_buffer_init(&b, array, sizeof(array));
......@@ -525,7 +525,7 @@ opendb(const char *prefix, dns_name_t *name, dns_rdataclass_t rdclass,
check_result(result, "dns_name_tofilenametext()");
if (isc_buffer_availablelength(&b) == 0) {
char namestr[DNS_NAME_FORMATSIZE];
dns_name_format(name, namestr, sizeof namestr);
dns_name_format(name, namestr, sizeof(namestr));
fatal("name '%s' is too long", namestr);
}
isc_buffer_putuint8(&b, 0);
......@@ -673,7 +673,7 @@ haschildkey(dns_name_t *name) {
dns_rdata_freestruct(&sig);
if (key == NULL) {
char namestr[DNS_NAME_FORMATSIZE];
dns_name_format(name, namestr, sizeof namestr);
dns_name_format(name, namestr, sizeof(namestr));
vbprintf(1, "unknown KEY in %s signedkey file\n",
namestr);
goto failure;
......@@ -685,7 +685,7 @@ haschildkey(dns_name_t *name) {
break;
} else {
char namestr[DNS_NAME_FORMATSIZE];
dns_name_format(name, namestr, sizeof namestr);
dns_name_format(name, namestr, sizeof(namestr));
vbprintf(1,
"verifying SIG in %s signedkey file: %s\n",
namestr, isc_result_totext(result));
......@@ -739,7 +739,7 @@ createnullkey(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
isc_result_t result;
char namestr[DNS_NAME_FORMATSIZE];
dns_name_format(name, namestr, sizeof namestr);
dns_name_format(name, namestr, sizeof(namestr));
vbprintf(2, "adding null key at %s\n", namestr);
key.common.rdclass = dns_db_class(db);
......@@ -751,7 +751,7 @@ createnullkey(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
key.algorithm = DNS_KEYALG_DSA;
key.datalen = 0;
key.data = NULL;
isc_buffer_init(&b, keydata, sizeof keydata);
isc_buffer_init(&b, keydata, sizeof(keydata));
result = dns_rdata_fromstruct(&keyrdata, dns_db_class(db),
dns_rdatatype_key, &key, &b);
if (result != ISC_R_SUCCESS)
......@@ -806,7 +806,7 @@ signname(dns_dbnode_t *node, dns_name_t *name) {
if (dns_name_iswildcard(name)) {
char namestr[DNS_NAME_FORMATSIZE];
dns_name_format(name, namestr, sizeof namestr);
dns_name_format(name, namestr, sizeof(namestr));
warnwild(namestr);
}
......@@ -847,7 +847,7 @@ signname(dns_dbnode_t *node, dns_name_t *name) {
NULL);
if (result == ISC_R_SUCCESS && childkey) {
char namestr[DNS_NAME_FORMATSIZE];
dns_name_format(name, namestr, sizeof namestr);
dns_name_format(name, namestr, sizeof(namestr));
if (hasnullkey(&keyset)) {
fatal("%s has both a signedkey file and "
"null keys in the zone. Aborting.",
......@@ -864,7 +864,7 @@ signname(dns_dbnode_t *node, dns_name_t *name) {
dns_rdataset_disassociate(&keyset);
} else if (childkey) {
char namestr[DNS_NAME_FORMATSIZE];
dns_name_format(name, namestr, sizeof namestr);
dns_name_format(name, namestr, sizeof(namestr));
vbprintf(2, "child key for %s found\n", namestr);
neednullkey = ISC_FALSE;
}
......@@ -923,7 +923,7 @@ signname(dns_dbnode_t *node, dns_name_t *name) {
}
if (result != ISC_R_NOMORE) {
char namestr[DNS_NAME_FORMATSIZE];
dns_name_format(name, namestr, sizeof namestr);
dns_name_format(name, namestr, sizeof(namestr));
fatal("rdataset iteration for name '%s' failed: %s",
namestr, isc_result_totext(result));
}
......@@ -932,7 +932,7 @@ signname(dns_dbnode_t *node, dns_name_t *name) {
result = dns_diff_apply(&diff, gdb, gversion);
if (result != ISC_R_SUCCESS) {
char namestr[DNS_NAME_FORMATSIZE];
dns_name_format(name, namestr, sizeof namestr);
dns_name_format(name, namestr, sizeof(namestr));
fatal("failed to add SIGs at node '%s': %s",
namestr, isc_result_totext(result));
}
......@@ -1043,7 +1043,7 @@ soattl(void) {
0, 0, NULL, name, &soaset, NULL);
if (result != ISC_R_SUCCESS) {
char namestr[DNS_NAME_FORMATSIZE];
dns_name_format(name, namestr, sizeof namestr);
dns_name_format(name, namestr, sizeof(namestr));
fatal("failed to find '%s SOA' in the zone: %s",
namestr, isc_result_totext(result));
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssectool.c,v 1.33 2001/09/05 23:15:42 bwelling Exp $ */
/* $Id: dnssectool.c,v 1.34 2001/09/19 23:05:15 gson Exp $ */
#include <config.h>
......@@ -124,8 +124,8 @@ sig_format(dns_rdata_sig_t *sig, char *cp, unsigned int size) {
char namestr[DNS_NAME_FORMATSIZE];
char algstr[DNS_NAME_FORMATSIZE];
dns_name_format(&sig->signer, namestr, sizeof namestr);
alg_format(sig->algorithm, algstr, sizeof algstr);
dns_name_format(&sig->signer, namestr, sizeof(namestr));
alg_format(sig->algorithm, algstr, sizeof(algstr));
snprintf(cp, size, "%s/%s/%d", namestr, algstr, sig->keyid);
}
......@@ -134,8 +134,8 @@ key_format(const dst_key_t *key, char *cp, unsigned int size) {
char namestr[DNS_NAME_FORMATSIZE];
char algstr[DNS_NAME_FORMATSIZE];
dns_name_format(dst_key_name(key), namestr, sizeof namestr);
alg_format((dns_secalg_t) dst_key_alg(key), algstr, sizeof algstr);
dns_name_format(dst_key_name(key), namestr, sizeof(namestr));
alg_format((dns_secalg_t) dst_key_alg(key), algstr, sizeof(algstr));
snprintf(cp, size, "%s/%s/%d", namestr, algstr, dst_key_id(key));
}
......@@ -237,7 +237,7 @@ setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx) {
isc_result_totext(result));
if (source != NULL) {
elt = isc_mem_get(mctx, sizeof *elt);
elt = isc_mem_get(mctx, sizeof(*elt));
if (elt == NULL)
fatal("out of memory");
elt->source = source;
......@@ -254,7 +254,7 @@ cleanup_entropy(isc_entropy_t **ectx) {
source = ISC_LIST_HEAD(sources);
ISC_LIST_UNLINK(sources, source, link);
isc_entropy_destroysource(&source->source);
isc_mem_put(source->mctx, source, sizeof *source);
isc_mem_put(source->mctx, source, sizeof(*source));
}
isc_entropy_detach(ectx);
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: client.c,v 1.177 2001/09/19 00:02:26 gson Exp $ */
/* $Id: client.c,v 1.178 2001/09/19 23:08:18 gson Exp $ */
#include <config.h>
......@@ -277,7 +277,7 @@ client_free(ns_client_t *client) {
CTRACE("free");
client->magic = 0;
isc_mem_put(client->mctx, client, sizeof *client);
isc_mem_put(client->mctx, client, sizeof(*client));
if (need_clientmgr_destroy)
clientmgr_destroy(manager);
......@@ -1638,7 +1638,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp)
REQUIRE(clientp != NULL && *clientp == NULL);
client = isc_mem_get(manager->mctx, sizeof *client);
client = isc_mem_get(manager->mctx, sizeof(*client));
if (client == NULL)
return (ISC_R_NOMEMORY);
......@@ -1776,7 +1776,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp)
isc_task_detach(&client->task);
cleanup_client:
isc_mem_put(manager->mctx, client, sizeof *client);
isc_mem_put(manager->mctx, client, sizeof(*client));
return (result);
}
......@@ -2034,7 +2034,7 @@ clientmgr_destroy(ns_clientmgr_t *manager) {
DESTROYLOCK(&manager->lock);
manager->magic = 0;
isc_mem_put(manager->mctx, manager, sizeof *manager);
isc_mem_put(manager->mctx, manager, sizeof(*manager));
}
isc_result_t
......@@ -2044,7 +2044,7 @@ ns_clientmgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
ns_clientmgr_t *manager;
isc_result_t result;
manager = isc_mem_get(mctx, sizeof *manager);
manager = isc_mem_get(mctx, sizeof(*manager));
if (manager == NULL)
return (ISC_R_NOMEMORY);
......@@ -2067,7 +2067,7 @@ ns_clientmgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
return (ISC_R_SUCCESS);
cleanup_manager:
isc_mem_put(manager->mctx, manager, sizeof *manager);
isc_mem_put(manager->mctx, manager, sizeof(*manager));
return (result);
}
......@@ -2263,7 +2263,7 @@ ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
char peerbuf[ISC_SOCKADDR_FORMATSIZE];
vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
ns_client_name(client, peerbuf, sizeof peerbuf);
ns_client_name(client, peerbuf, sizeof(peerbuf));
isc_log_write(ns_g_lctx, category, module, level,
"client %s: %s", peerbuf, msgbuf);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: interfacemgr.c,v 1.60 2001/09/10 23:03:09 gson Exp $ */
/* $Id: interfacemgr.c,v 1.61 2001/09/19 23:08:19 gson Exp $ */
#include <config.h>
......@@ -119,7 +119,7 @@ ns_interfacemgr_destroy(ns_interfacemgr_t *mgr) {
ns_listenlist_detach(&mgr->listenon6);
DESTROYLOCK(&mgr->lock);
mgr->magic = 0;
isc_mem_put(mgr->mctx, mgr, sizeof *mgr);
isc_mem_put(mgr->mctx, mgr, sizeof(*mgr));
}
dns_aclenv_t *
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwdclient.c,v 1.13 2001/01/22 22:29:02 gson Exp $ */
/* $Id: lwdclient.c,v 1.14 2001/09/19 23:08:20 gson Exp $ */
#include <config.h>
......@@ -116,7 +116,7 @@ ns_lwdclientmgr_create(ns_lwreslistener_t *listener, unsigned int nclients,
client = ISC_LIST_HEAD(cm->idle);
while (client != NULL) {
ISC_LIST_UNLINK(cm->idle, client, link);
isc_mem_put(lwresd->mctx, client, sizeof (*client));
isc_mem_put(lwresd->mctx, client, sizeof(*client));
client = ISC_LIST_HEAD(cm->idle);
}
......@@ -126,7 +126,7 @@ ns_lwdclientmgr_create(ns_lwreslistener_t *listener, unsigned int nclients,
if (cm->lwctx != NULL)
lwres_context_destroy(&cm->lwctx);
isc_mem_put(lwresd->mctx, cm, sizeof (*cm));
isc_mem_put(lwresd->mctx, cm, sizeof(*cm));
return (result);
}
......@@ -148,7 +148,7 @@ lwdclientmgr_destroy(ns_lwdclientmgr_t *cm) {
ns_lwdclient_log(50, "destroying client %p, manager %p",
client, cm);
ISC_LIST_UNLINK(cm->idle, client, link);
isc_mem_put(cm->mctx, client, sizeof (*client));
isc_mem_put(cm->mctx, client, sizeof(*client));
client = ISC_LIST_HEAD(cm->idle);
}
......@@ -163,7 +163,7 @@ lwdclientmgr_destroy(ns_lwdclientmgr_t *cm) {
listener = cm->listener;
ns_lwreslistener_unlinkcm(listener, cm);
ns_lwdclient_log(50, "destroying manager %p", cm);
isc_mem_put(cm->mctx, cm, sizeof (*cm));
isc_mem_put(cm->mctx, cm, sizeof(*cm));
ns_lwreslistener_detach(&listener);
}
......@@ -329,7 +329,7 @@ lwdclientmgr_shutdown_callback(isc_task_t *task, isc_event_t *ev) {
ns_lwdclient_log(50, "destroying client %p, manager %p",
client, cm);
ISC_LIST_UNLINK(cm->idle, client, link);
isc_mem_put(cm->mctx, client, sizeof (*client));
isc_mem_put(cm->mctx, client, sizeof(*client));
client = ISC_LIST_HEAD(cm->idle);
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: query.c,v 1.200 2001/09/11 01:21:38 gson Exp $ */
/* $Id: query.c,v 1.201 2001/09/19 23:08:21 gson Exp $ */
#include <config.h>
......@@ -224,7 +224,7 @@ query_reset(ns_client_t *client, isc_boolean_t everything) {
ISC_LIST_UNLINK(client->query.freeversions, dbversion,
link);
isc_mem_put(client->mctx, dbversion,
sizeof *dbversion);
sizeof(*dbversion));
}
}
......@@ -426,7 +426,7 @@ query_newdbversion(ns_client_t *client, unsigned int n) {
ns_dbversion_t *dbversion;
for (i = 0; i < n; i++) {
dbversion = isc_mem_get(client->mctx, sizeof *dbversion);
dbversion = isc_mem_get(client->mctx, sizeof(*dbversion));
if (dbversion != NULL) {
dbversion->db = NULL;
dbversion->version = NULL;
......@@ -620,7 +620,7 @@ query_getzonedb(ns_client_t *client, dns_name_t *name, unsigned int options,
result = ns_client_checkaclsilent(client, queryacl, ISC_TRUE);
if (log) {
char msg[DNS_NAME_FORMATSIZE + DNS_RDATACLASS_FORMATSIZE
+ sizeof "query '/'"];
+ sizeof("query '/'")];
if (result == ISC_R_SUCCESS) {
if (isc_log_wouldlog(ns_g_lctx,
ISC_LOG_DEBUG(3)))
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: os.c,v 1.49 2001/09/07 00:36:57 marka Exp $ */
/* $Id: os.c,v 1.50 2001/09/19 23:08:24 gson Exp $ */
#include <config.h>
#include <stdarg.h>
......@@ -139,10 +139,10 @@ linux_setcaps(unsigned int caps) {
if ((getuid() != 0 && !non_root_caps) || non_root)
return;
memset(&caphead, 0, sizeof caphead);
memset(&caphead, 0, sizeof(caphead));
caphead.version = _LINUX_CAPABILITY_VERSION;
caphead.pid = 0;
memset(&cap, 0, sizeof cap);
memset(&cap, 0, sizeof(cap));
cap.effective = caps;
cap.permitted = caps;
cap.inheritable = caps;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: update.c,v 1.88 2001/05/31 10:37:58 tale Exp $ */
/* $Id: update.c,v 1.89 2001/09/19 23:08:23 gson Exp $ */
#include <config.h>
......@@ -172,7 +172,7 @@ update_log(ns_client_t *client, dns_zone_t *zone,
sizeof(classbuf));
va_start(ap, fmt);
vsnprintf(message, sizeof message, fmt, ap);
vsnprintf(message, sizeof(message), fmt, ap);
va_end(ap);
ns_client_log(client, NS_LOGCATEGORY_UPDATE, NS_LOGMODULE_UPDATE,
......@@ -1470,7 +1470,7 @@ add_placeholder_nxt(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
dns_rdata_t rdata = DNS_RDATA_INIT;
r.base = data;
r.length = sizeof data;
r.length = sizeof(data);
dns_rdata_fromregion(&rdata, dns_db_class(db), dns_rdatatype_nxt, &r);
CHECK(dns_difftuple_create(diff->mctx, DNS_DIFFOP_ADD, name, 0,
&rdata, &tuple));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment