summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--h/internal.h2
-rw-r--r--lib/ZInit.c6
-rw-r--r--lib/quad_cksum.c10
-rw-r--r--server/bdump.c12
-rw-r--r--server/subscr.c9
5 files changed, 20 insertions, 19 deletions
diff --git a/h/internal.h b/h/internal.h
index e0434bd..7cc1844 100644
--- a/h/internal.h
+++ b/h/internal.h
@@ -149,7 +149,7 @@ Code_t Z_InsertZcodeChecksum(krb5_keyblock *keyblock, ZNotice_t *notice,
char *cksum_start, int cksum_len,
char *cstart, char *cend, int buffer_len,
int *length_ajdust);
-unsigned long z_quad_cksum(const unsigned char *, u_int32_t *, long,
+unsigned long z_quad_cksum(const unsigned char *, uint32_t *, long,
int, unsigned char *);
#endif
diff --git a/lib/ZInit.c b/lib/ZInit.c
index e8f4a83..f6ec6de 100644
--- a/lib/ZInit.c
+++ b/lib/ZInit.c
@@ -301,11 +301,11 @@ static int txt_lookup(char *qname, char **result) {
if (left < 10)
return -1;
- type = ntohs(*(u_int16_t *)p);
+ type = ntohs(*(uint16_t *)p);
p += 2;
- class = ntohs(*(u_int16_t *)p);
+ class = ntohs(*(uint16_t *)p);
p += 6;
- ret = ntohs(*(u_int16_t *)p);
+ ret = ntohs(*(uint16_t *)p);
p += 2;
left -= 10;
diff --git a/lib/quad_cksum.c b/lib/quad_cksum.c
index dc43e46..3e5d377 100644
--- a/lib/quad_cksum.c
+++ b/lib/quad_cksum.c
@@ -124,7 +124,7 @@
#ifdef HAVE_KRB5
unsigned long
z_quad_cksum(const unsigned char *in, /* input block */
- u_int32_t *out, /* optional longer output */
+ uint32_t *out, /* optional longer output */
long length, /* original length in bytes */
int out_count, /* number of iterations */
unsigned char *c_seed /* secret seed, 8 bytes */
@@ -138,10 +138,10 @@ z_quad_cksum(const unsigned char *in, /* input block */
* checksum is written unto the address pointed to.
*/
- register u_int32_t z;
- register u_int32_t z2;
- register u_int32_t x;
- register u_int32_t x2;
+ register uint32_t z;
+ register uint32_t z2;
+ register uint32_t x;
+ register uint32_t x2;
const unsigned char *p;
register int32_t len;
register int i;
diff --git a/server/bdump.c b/server/bdump.c
index 991c3e1..ad9fef6 100644
--- a/server/bdump.c
+++ b/server/bdump.c
@@ -1301,7 +1301,7 @@ bdump_recv_loop(Server *server)
} else {
retval = Z_krb5_init_keyblock(Z_krb5_ctx,
ntohl(*(krb5_enctype *)&buf[0]),
- ntohl(*(u_int32_t *)&buf[4]),
+ ntohl(*(uint32_t *)&buf[4]),
&client->session_keyblock);
if (retval) {
syslog(LOG_ERR, "brl failed to allocate keyblock: %s",
@@ -1467,7 +1467,7 @@ send_normal_tcp(ZNotice_Kind_t kind,
char *pack;
int packlen, count;
Code_t retval;
- u_short length;
+ unsigned short length;
memset (&notice, 0, sizeof(notice));
@@ -1512,7 +1512,7 @@ send_normal_tcp(ZNotice_Kind_t kind,
}
#endif
- length = htons((u_short) packlen);
+ length = htons((unsigned short) packlen);
count = net_write(output, (char *) &length, sizeof(length));
if (count != sizeof(length)) {
@@ -1550,10 +1550,10 @@ send_normal_tcp(ZNotice_Kind_t kind,
static Code_t
get_packet(void *packet, int len, int *retlen)
{
- u_short length;
+ unsigned short length;
int result;
- result = net_read(input, (char *) &length, sizeof(u_short));
+ result = net_read(input, (char *) &length, sizeof(unsigned short));
if (result < sizeof(short)) {
if (result < 0) {
return errno;
@@ -1596,7 +1596,7 @@ extract_sin(ZNotice_t *notice, struct sockaddr_in *target)
if ((cp >= notice->z_message + notice->z_message_len) || (*cp == '\0')) {
return(ZSRV_PKSHORT);
}
- target->sin_port = htons((u_short) atoi(cp));
+ target->sin_port = htons((unsigned short)atoi(cp));
target->sin_family = AF_INET;
return ZERR_NONE;
}
diff --git a/server/subscr.c b/server/subscr.c
index 201721b..0516647 100644
--- a/server/subscr.c
+++ b/server/subscr.c
@@ -811,7 +811,7 @@ subscr_send_subs(Client *client)
return errno;
}
*(krb5_enctype *)&bufp[0] = htonl(Z_enctype(client->session_keyblock));
- *(u_int32_t *)&bufp[4] = htonl(Z_keylen(client->session_keyblock));
+ *(uint32_t *)&bufp[4] = htonl(Z_keylen(client->session_keyblock));
memcpy(&bufp[8], Z_keydata(client->session_keyblock), Z_keylen(client->session_keyblock));
retval = ZMakeZcode(buf, sizeof(buf), bufp, Z_keylen(client->session_keyblock) + 8);
@@ -1010,7 +1010,7 @@ subscr_realm_sendit(Client *who,
/* convert the address to a string of the form x.x.x.x/port */
strcpy(addr, inet_ntoa(who->addr.sin_addr));
if ((retval = ZMakeAscii(port, sizeof(port), (unsigned char *)
- &who->addr.sin_port, sizeof(u_short))) != ZERR_NONE)
+ &who->addr.sin_port, sizeof(unsigned short))) != ZERR_NONE)
{
syslog(LOG_ERR, "subscr_rlm_sendit make ascii: %s",
error_message(retval));
@@ -1285,7 +1285,7 @@ subscr_realm_subs(ZRealm *realm)
num = 0;
if ((retval = ZMakeAscii(port, sizeof(port), (unsigned char *)
- &num, sizeof(u_short))) != ZERR_NONE)
+ &num, sizeof(unsigned short))) != ZERR_NONE)
{
syslog(LOG_ERR, "subscr_rlm_sendit make ascii: %s",
error_message(retval));
@@ -1499,7 +1499,8 @@ Code_t subscr_foreign_user(ZNotice_t *notice,
snotice = *notice;
- if ((status = ZReadAscii(cp, strlen(cp), (unsigned char *)&snotice.z_port, sizeof(u_short)))
+ if ((status = ZReadAscii(cp, strlen(cp), (unsigned char *)&snotice.z_port,
+ sizeof(unsigned short)))
!= ZERR_NONE)
{
syslog(LOG_ERR, "subscr_foreign_user read ascii: %s",