fix printf formats on LP64, from NetBSD
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8442 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -311,7 +311,8 @@ init_sockets(struct descr **desc)
|
||||
parse_ports(port_str);
|
||||
d = malloc(addresses.len * num_ports * sizeof(*d));
|
||||
if (d == NULL)
|
||||
krb5_errx(context, 1, "malloc(%u) failed", num_ports * sizeof(*d));
|
||||
krb5_errx(context, 1, "malloc(%lu) failed",
|
||||
(unsigned long)num_ports * sizeof(*d));
|
||||
|
||||
for (i = 0; i < num_ports; i++){
|
||||
for (j = 0; j < addresses.len; ++j) {
|
||||
@@ -336,7 +337,8 @@ init_sockets(struct descr **desc)
|
||||
krb5_free_addresses (context, &addresses);
|
||||
d = realloc(d, num * sizeof(*d));
|
||||
if (d == NULL && num != 0)
|
||||
krb5_errx(context, 1, "realloc(%u) failed", num * sizeof(*d));
|
||||
krb5_errx(context, 1, "realloc(%lu) failed",
|
||||
(unsigned long)num * sizeof(*d));
|
||||
reinit_descrs (d, num);
|
||||
*desc = d;
|
||||
return num;
|
||||
|
Reference in New Issue
Block a user