svn rev #21875: trunk/src/ appl/bsd/ appl/gss-sample/ appl/gssftp/ftp/ appl/gssftp/ftpd/ ...
raeburn@MIT.EDU
raeburn at MIT.EDU
Mon Feb 2 18:41:55 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=21875
Commit By: raeburn
Log Message:
Remove unnecessary pointer casts in args to free,memcpy,memset,memchr except unicode, windows code.
Changed Files:
U trunk/src/appl/bsd/krcp.c
U trunk/src/appl/bsd/krlogind.c
U trunk/src/appl/bsd/krshd.c
U trunk/src/appl/gss-sample/gss-client.c
U trunk/src/appl/gssftp/ftp/ftp.c
U trunk/src/appl/gssftp/ftpd/ftpd.c
U trunk/src/appl/gssftp/ftpd/popen.c
U trunk/src/appl/simple/client/sim_client.c
U trunk/src/appl/simple/server/sim_server.c
U trunk/src/appl/telnet/libtelnet/auth.c
U trunk/src/appl/telnet/libtelnet/enc_des.c
U trunk/src/appl/telnet/libtelnet/kerberos5.c
U trunk/src/appl/telnet/telnet/commands.c
U trunk/src/appl/telnet/telnet/general.h
U trunk/src/appl/telnet/telnet/ring.c
U trunk/src/appl/telnet/telnetd/sys_term.c
U trunk/src/appl/telnet/telnetd/telnetd-ktd.c
U trunk/src/appl/telnet/telnetd/telnetd.c
U trunk/src/appl/telnet/telnetd/termstat.c
U trunk/src/appl/user_user/client.c
U trunk/src/appl/user_user/server.c
U trunk/src/clients/ksu/ccache.c
U trunk/src/clients/ksu/heuristic.c
U trunk/src/clients/ksu/krb_auth_su.c
U trunk/src/kadmin/cli/kadmin.c
U trunk/src/kadmin/cli/keytab.c
U trunk/src/kadmin/dbutil/dump.c
U trunk/src/kadmin/dbutil/kdb5_create.c
U trunk/src/kadmin/dbutil/kdb5_mkey.c
U trunk/src/kadmin/dbutil/kdb5_util.c
U trunk/src/kadmin/ktutil/ktutil_funcs.c
U trunk/src/kadmin/server/ipropd_svc.c
U trunk/src/kadmin/server/kadm_rpc_svc.c
U trunk/src/kadmin/server/ovsec_kadmd.c
U trunk/src/kdc/kdc_util.c
U trunk/src/kdc/main.c
U trunk/src/lib/crypto/des/afsstring2key.c
U trunk/src/lib/gssapi/generic/gssapiP_generic.h
U trunk/src/lib/gssapi/krb5/init_sec_context.c
U trunk/src/lib/gssapi/krb5/util_crypt.c
U trunk/src/lib/gssapi/spnego/spnego_mech.c
U trunk/src/lib/kadm5/alt_prof.c
U trunk/src/lib/kadm5/clnt/client_init.c
U trunk/src/lib/kadm5/clnt/client_rpc.c
U trunk/src/lib/kadm5/kadm_rpc_xdr.c
U trunk/src/lib/kadm5/srv/server_acl.c
U trunk/src/lib/kadm5/srv/server_init.c
U trunk/src/lib/kadm5/srv/svr_principal.c
U trunk/src/lib/kadm5/unit-test/setkey-test.c
U trunk/src/lib/kdb/kdb_cpw.c
U trunk/src/lib/kdb/kdb_default.c
U trunk/src/lib/krb5/asn.1/asn1glue.h
U trunk/src/lib/krb5/ccache/cc_file.c
U trunk/src/lib/krb5/krb/auth_con.c
U trunk/src/lib/krb5/krb/copy_addrs.c
U trunk/src/lib/krb5/krb/copy_auth.c
U trunk/src/lib/krb5/krb/copy_cksum.c
U trunk/src/lib/krb5/krb/copy_data.c
U trunk/src/lib/krb5/krb/copy_key.c
U trunk/src/lib/krb5/krb/copy_tick.c
U trunk/src/lib/krb5/krb/cp_key_cnt.c
U trunk/src/lib/krb5/krb/fwd_tgt.c
U trunk/src/lib/krb5/krb/get_creds.c
U trunk/src/lib/krb5/krb/get_in_tkt.c
U trunk/src/lib/krb5/krb/kfree.c
U trunk/src/lib/krb5/krb/mk_priv.c
U trunk/src/lib/krb5/krb/mk_req.c
U trunk/src/lib/krb5/krb/mk_safe.c
U trunk/src/lib/krb5/krb/rd_safe.c
U trunk/src/lib/krb5/krb/recvauth.c
U trunk/src/lib/krb5/krb/send_tgs.c
U trunk/src/lib/krb5/krb/sendauth.c
U trunk/src/lib/krb5/krb/t_ser.c
U trunk/src/lib/krb5/os/full_ipadr.c
U trunk/src/lib/krb5/os/gen_port.c
U trunk/src/lib/krb5/os/mk_faddr.c
U trunk/src/lib/krb5/os/port2ip.c
U trunk/src/lib/rpc/auth_gssapi.c
U trunk/src/lib/rpc/get_myaddress.c
U trunk/src/lib/rpc/svc_auth_gssapi.c
U trunk/src/lib/rpc/svc_tcp.c
U trunk/src/lib/rpc/svc_udp.c
U trunk/src/lib/rpc/unit-test/rpc_test_clnt.c
U trunk/src/lib/rpc/unit-test/rpc_test_svc.c
U trunk/src/plugins/kdb/db2/kdb_db2.c
U trunk/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c
U trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_krbcontainer.c
U trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c
U trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c
U trunk/src/slave/kprop.c
U trunk/src/slave/kpropd.c
U trunk/src/slave/kpropd_rpc.c
U trunk/src/slave/kproplog.c
U trunk/src/tests/create/kdb5_mkdums.c
U trunk/src/tests/gss-threads/gss-client.c
U trunk/src/tests/hammer/kdc5_hammer.c
U trunk/src/tests/misc/test_getsockname.c
U trunk/src/tests/verify/kdb5_verify.c
Modified: trunk/src/appl/bsd/krcp.c
===================================================================
--- trunk/src/appl/bsd/krcp.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/bsd/krcp.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -1300,7 +1300,7 @@
exit(1);
}
- memset ((char*)&creds, 0, sizeof(creds));
+ memset (&creds, 0, sizeof(creds));
if ((status = krb5_read_message(bsd_context, (krb5_pointer)&rem,
&pname_data)))
Modified: trunk/src/appl/bsd/krlogind.c
===================================================================
--- trunk/src/appl/bsd/krlogind.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/bsd/krlogind.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -469,7 +469,7 @@
fprintf(stderr, "Error in socket: %s\n", strerror(errno));
exit(2);
}
- memset((char *) &sock_in, 0,sizeof(sock_in));
+ memset(&sock_in, 0,sizeof(sock_in));
sock_in.sin_family = AF_INET;
sock_in.sin_port = htons(debug_port);
sock_in.sin_addr.s_addr = INADDR_ANY;
@@ -920,7 +920,7 @@
return (0);
#ifdef TIOCSWINSZ
oobdata[0] &= ~TIOCPKT_WINDOW; /* we know he heard */
- memcpy((char *)&w,cp+4, sizeof(w));
+ memcpy(&w, cp+4, sizeof(w));
w.ws_row = ntohs(w.ws_row);
w.ws_col = ntohs(w.ws_col);
w.ws_xpixel = ntohs(w.ws_xpixel);
Modified: trunk/src/appl/bsd/krshd.c
===================================================================
--- trunk/src/appl/bsd/krshd.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/bsd/krshd.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -1950,7 +1950,7 @@
exit(2);
}
- memset((char *) &sock_in6, 0,sizeof(sock_in6));
+ memset(&sock_in6, 0,sizeof(sock_in6));
sock_in6.sin6_family = AF_INET6;
sock_in6.sin6_port = htons(debug_port);
sock_in6.sin6_addr = in6addr_any;
@@ -1982,7 +1982,7 @@
exit(2);
}
- memset((char *) &sock_in, 0,sizeof(sock_in));
+ memset(&sock_in, 0,sizeof(sock_in));
sock_in.sin_family = AF_INET;
sock_in.sin_port = htons(debug_port);
sock_in.sin_addr.s_addr = INADDR_ANY;
Modified: trunk/src/appl/gss-sample/gss-client.c
===================================================================
--- trunk/src/appl/gss-sample/gss-client.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/gss-sample/gss-client.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -114,7 +114,7 @@
}
saddr.sin_family = hp->h_addrtype;
- memcpy((char *) &saddr.sin_addr, hp->h_addr, sizeof(saddr.sin_addr));
+ memcpy(&saddr.sin_addr, hp->h_addr, sizeof(saddr.sin_addr));
saddr.sin_port = htons(port);
if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
Modified: trunk/src/appl/gssftp/ftp/ftp.c
===================================================================
--- trunk/src/appl/gssftp/ftp/ftp.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/gssftp/ftp/ftp.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -196,7 +196,7 @@
#endif
static char hostnamebuf[80];
- memset((char *)&hisctladdr, 0, sizeof (hisctladdr));
+ memset(&hisctladdr, 0, sizeof (hisctladdr));
hisctladdr.sin_addr.s_addr = inet_addr(host);
if (hisctladdr.sin_addr.s_addr != -1) {
hisctladdr.sin_family = AF_INET;
Modified: trunk/src/appl/gssftp/ftpd/ftpd.c
===================================================================
--- trunk/src/appl/gssftp/ftpd/ftpd.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/gssftp/ftpd/ftpd.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -869,7 +869,7 @@
char ccname[MAXPATHLEN];
#ifdef GSSAPI
- memset((char *)&my_creds, 0, sizeof(my_creds));
+ memset(&my_creds, 0, sizeof(my_creds));
if (krb5_parse_name(kcontext, name, &me))
return 0;
my_creds.client = me;
Modified: trunk/src/appl/gssftp/ftpd/popen.c
===================================================================
--- trunk/src/appl/gssftp/ftpd/popen.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/gssftp/ftpd/popen.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -78,7 +78,7 @@
return(NULL);
if ((pids = (int *)malloc((u_int)(fds * sizeof(int)))) == NULL)
return(NULL);
- memset((char *)pids, 0, fds * sizeof(int));
+ memset(pids, 0, fds * sizeof(int));
}
if (pipe(pdes) < 0)
return(NULL);
Modified: trunk/src/appl/simple/client/sim_client.c
===================================================================
--- trunk/src/appl/simple/client/sim_client.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/simple/client/sim_client.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -161,9 +161,9 @@
*cp = tolower((int) *cp);
/* Set server's address */
- (void) memset((char *)&s_sock, 0, sizeof(s_sock));
+ (void) memset(&s_sock, 0, sizeof(s_sock));
- memcpy((char *)&s_sock.sin_addr, host->h_addr, sizeof(s_sock.sin_addr));
+ memcpy(&s_sock.sin_addr, host->h_addr, sizeof(s_sock.sin_addr));
#ifdef DEBUG
printf("s_sock.sin_addr is %s\n", inet_ntoa(s_sock.sin_addr));
#endif
@@ -186,7 +186,7 @@
exit(1);
}
- memset((char *)&c_sock, 0, sizeof(c_sock));
+ memset(&c_sock, 0, sizeof(c_sock));
c_sock.sin_family = AF_INET;
#ifdef BROKEN_STREAMS_SOCKETS
if (gethostname(my_hostname, sizeof(my_hostname)) < 0) {
@@ -198,7 +198,7 @@
fprintf(stderr, "%s: unknown host\n", hostname);
exit(1);
}
- memcpy((char *)&c_sock.sin_addr, host->h_addr, sizeof(c_sock.sin_addr));
+ memcpy(&c_sock.sin_addr, host->h_addr, sizeof(c_sock.sin_addr));
#endif
@@ -243,7 +243,7 @@
/* PREPARE KRB_SAFE MESSAGE */
/* Get my address */
- memset((char *) &c_sock, 0, sizeof(c_sock));
+ memset(&c_sock, 0, sizeof(c_sock));
len = sizeof(c_sock);
if (getsockname(sock, (struct sockaddr *)&c_sock, &len) < 0) {
com_err(progname, errno, "while getting socket name");
Modified: trunk/src/appl/simple/server/sim_server.c
===================================================================
--- trunk/src/appl/simple/server/sim_server.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/simple/server/sim_server.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -132,7 +132,7 @@
}
/* Set up server address */
- memset((char *)&s_sock, 0, sizeof(s_sock));
+ memset(&s_sock, 0, sizeof(s_sock));
s_sock.sin_family = AF_INET;
if (port == 0) {
@@ -155,7 +155,7 @@
fprintf(stderr, "%s: host unknown\n", full_hname);
exit(1);
}
- memcpy((char *)&s_sock.sin_addr, host->h_addr, sizeof(s_sock.sin_addr));
+ memcpy(&s_sock.sin_addr, host->h_addr, sizeof(s_sock.sin_addr));
/* Open socket */
if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
Modified: trunk/src/appl/telnet/libtelnet/auth.c
===================================================================
--- trunk/src/appl/telnet/libtelnet/auth.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/telnet/libtelnet/auth.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -383,8 +383,7 @@
auth_send_cnt = cnt;
if (auth_send_cnt > sizeof(_auth_send_data))
auth_send_cnt = sizeof(_auth_send_data);
- memcpy((void *)_auth_send_data, (void *)data,
- (unsigned) auth_send_cnt);
+ memcpy(_auth_send_data, data, (unsigned) auth_send_cnt);
auth_send_data = _auth_send_data;
auth_send_retry();
@@ -510,7 +509,7 @@
Name, cnt, (int) sizeof(savename)-1);
return;
}
- memcpy((void *)savename, (void *)data, (unsigned) cnt);
+ memcpy(savename, data, (unsigned) cnt);
savename[cnt] = '\0'; /* Null terminate */
if (auth_debug_mode)
printf(">>>%s: Got NAME [%s]\r\n", Name, savename);
Modified: trunk/src/appl/telnet/libtelnet/enc_des.c
===================================================================
--- trunk/src/appl/telnet/libtelnet/enc_des.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/telnet/libtelnet/enc_des.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -199,7 +199,7 @@
fb64_init(fbp)
register struct fb *fbp;
{
- memset((void *)fbp, 0, sizeof(*fbp));
+ memset(fbp, 0, sizeof(*fbp));
fbp->state[0] = fbp->state[1] = FAILED;
fbp->fb_feed[0] = IAC;
fbp->fb_feed[1] = SB;
@@ -600,8 +600,8 @@
Block seed;
register struct stinfo *stp;
{
- memcpy((void *)stp->str_iv, (void *)seed, sizeof(Block));
- memcpy((void *)stp->str_output, (void *)seed, sizeof(Block));
+ memcpy(stp->str_iv, seed, sizeof(Block));
+ memcpy(stp->str_output, seed, sizeof(Block));
stp->str_index = sizeof(Block);
}
@@ -611,7 +611,7 @@
Block key;
register struct stinfo *stp;
{
- memcpy((void *)stp->str_keybytes, (void *)key, sizeof(Block));
+ memcpy(stp->str_keybytes, key, sizeof(Block));
stp->str_key.length = 8;
stp->str_key.contents = stp->str_keybytes;
/* the original version of this code uses des ecb mode, but
@@ -619,7 +619,7 @@
is identical */
stp->str_key.enctype = ENCTYPE_DES_CBC_RAW;
- memcpy((void *)stp->str_output, (void *)stp->str_iv, sizeof(Block));
+ memcpy(stp->str_output, stp->str_iv, sizeof(Block));
stp->str_index = sizeof(Block);
}
@@ -659,7 +659,7 @@
if (idx == sizeof(Block)) {
Block b;
ecb_encrypt(stp, stp->str_output, b);
- memcpy((void *)stp->str_feed,(void *)b,sizeof(Block));
+ memcpy(stp->str_feed,b,sizeof(Block));
idx = 0;
}
@@ -693,7 +693,7 @@
if (idx == sizeof(Block)) {
Block b;
ecb_encrypt(stp, stp->str_output, b);
- memcpy((void *)stp->str_feed, (void *)b, sizeof(Block));
+ memcpy(stp->str_feed, b, sizeof(Block));
stp->str_index = 1; /* Next time will be 1 */
idx = 0; /* But now use 0 */
}
@@ -735,7 +735,7 @@
if (idx == sizeof(Block)) {
Block b;
ecb_encrypt(stp, stp->str_feed, b);
- memcpy((void *)stp->str_feed,(void *)b,sizeof(Block));
+ memcpy(stp->str_feed,b,sizeof(Block));
idx = 0;
}
*s++ ^= stp->str_feed[idx];
@@ -766,7 +766,7 @@
if (idx == sizeof(Block)) {
Block b;
ecb_encrypt(stp, stp->str_feed, b);
- memcpy((void *)stp->str_feed, (void *)b, sizeof(Block));
+ memcpy(stp->str_feed, b, sizeof(Block));
stp->str_index = 1; /* Next time will be 1 */
idx = 0; /* But now use 0 */
}
Modified: trunk/src/appl/telnet/libtelnet/kerberos5.c
===================================================================
--- trunk/src/appl/telnet/libtelnet/kerberos5.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/telnet/libtelnet/kerberos5.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -249,7 +249,7 @@
return(0);
}
- memset((char *)&creds, 0, sizeof(creds));
+ memset(&creds, 0, sizeof(creds));
if (auth_debug_mode)
printf("telnet: calling krb5_sname_to_principal\n");
if ((r = krb5_sname_to_principal(telnet_context, RemoteHostName,
Modified: trunk/src/appl/telnet/telnet/commands.c
===================================================================
--- trunk/src/appl/telnet/telnet/commands.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/telnet/telnet/commands.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -3144,17 +3144,16 @@
sin_addr.s_addr = tmp;
} else if ((host = gethostbyname(cp))) {
#if defined(h_addr)
- memcpy((caddr_t)&sin_addr,
- host->h_addr_list[0], sizeof(sin_addr));
+ memcpy(&sin_addr,
+ host->h_addr_list[0], sizeof(sin_addr));
#else
- memcpy((caddr_t)&sin_addr, host->h_addr,
- sizeof(sin_addr));
+ memcpy(&sin_addr, host->h_addr, sizeof(sin_addr));
#endif
} else {
*cpp = cp;
return(0);
}
- memcpy(lsrp, (char *)&sin_addr, 4);
+ memcpy(lsrp, &sin_addr, 4);
lsrp += 4;
if (cp2)
cp = cp2;
Modified: trunk/src/appl/telnet/telnet/general.h
===================================================================
--- trunk/src/appl/telnet/telnet/general.h 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/telnet/telnet/general.h 2009-02-02 23:41:40 UTC (rev 21875)
@@ -41,5 +41,5 @@
#define numberof(x) (sizeof x/sizeof x[0])
#define highestof(x) (numberof(x)-1)
-#define ClearElement(x) memset((char *)&x, 0, sizeof x)
-#define ClearArray(x) memset((char *)x, 0, sizeof x)
+#define ClearElement(x) memset(&x, 0, sizeof x)
+#define ClearArray(x) memset(x, 0, sizeof x)
Modified: trunk/src/appl/telnet/telnet/ring.c
===================================================================
--- trunk/src/appl/telnet/telnet/ring.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/telnet/telnet/ring.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -109,7 +109,7 @@
unsigned char *buffer;
int count;
{
- memset((char *)ring, 0, sizeof *ring);
+ memset(ring, 0, sizeof *ring);
ring->size = count;
Modified: trunk/src/appl/telnet/telnetd/sys_term.c
===================================================================
--- trunk/src/appl/telnet/telnetd/sys_term.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/telnet/telnetd/sys_term.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -235,7 +235,7 @@
{
if (len > sizeof(termbuf))
len = sizeof(termbuf);
- memcpy((char *)&termbuf, cp, len);
+ memcpy(&termbuf, cp, len);
termbuf2 = termbuf;
}
#endif /* defined(LINEMODE) && defined(TIOCPKT_IOCTL) */
@@ -956,7 +956,7 @@
init_termbuf();
# ifdef TIOCGWINSZ
if (def_row || def_col) {
- memset((char *)&ws, 0, sizeof(ws));
+ memset(&ws, 0, sizeof(ws));
ws.ws_col = def_col;
ws.ws_row = def_row;
(void)ioctl(t, TIOCSWINSZ, (char *)&ws);
@@ -1137,7 +1137,7 @@
INIT_FIFO);
fatalperror(net, tbuf);
}
- memset((char *)&request, 0, sizeof(request));
+ memset(&request, 0, sizeof(request));
request.magic = INIT_MAGIC;
SCPYN(request.gen_id, gen_id);
SCPYN(request.tty_id, &line[8]);
Modified: trunk/src/appl/telnet/telnetd/telnetd-ktd.c
===================================================================
--- trunk/src/appl/telnet/telnetd/telnetd-ktd.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/telnet/telnetd/telnetd-ktd.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -395,7 +395,7 @@
if (secflag) {
int sz = sizeof(ss);
- memset((char *)&dv, 0, sizeof(dv));
+ memset(&dv, 0, sizeof(dv));
if (getsysv(&sysv, sizeof(struct sysv)) != 0) {
perror("getsysv");
Modified: trunk/src/appl/telnet/telnetd/telnetd.c
===================================================================
--- trunk/src/appl/telnet/telnetd/telnetd.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/telnet/telnetd/telnetd.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -564,7 +564,7 @@
int szi = sizeof(int);
#endif /* SO_SEC_MULTI */
- memset((char *)&dv, 0, sizeof(dv));
+ memset(&dv, 0, sizeof(dv));
if (getsysv(&sysv, sizeof(struct sysv)) != 0) {
perror("getsysv");
Modified: trunk/src/appl/telnet/telnetd/termstat.c
===================================================================
--- trunk/src/appl/telnet/telnetd/termstat.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/telnet/telnetd/termstat.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -624,7 +624,7 @@
if (def_col || def_row) {
struct winsize ws;
- memset((char *)&ws, 0, sizeof(ws));
+ memset(&ws, 0, sizeof(ws));
ws.ws_col = def_col;
ws.ws_row = def_row;
(void) ioctl(pty, TIOCSWINSZ, (char *)&ws);
Modified: trunk/src/appl/user_user/client.c
===================================================================
--- trunk/src/appl/user_user/client.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/user_user/client.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -120,7 +120,7 @@
return 5;
}
- memcpy ((char *)&serv_net_addr.sin_addr, host->h_addr_list[i++],
+ memcpy (&serv_net_addr.sin_addr, host->h_addr_list[i++],
sizeof(serv_net_addr.sin_addr));
if (connect(s, (struct sockaddr *)&serv_net_addr,
@@ -139,7 +139,7 @@
return 6;
}
- memset ((char*)&creds, 0, sizeof(creds));
+ memset (&creds, 0, sizeof(creds));
retval = krb5_cc_get_principal(context, cc, &creds.client);
if (retval) {
Modified: trunk/src/appl/user_user/server.c
===================================================================
--- trunk/src/appl/user_user/server.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/appl/user_user/server.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -125,7 +125,7 @@
return 4;
}
- memset ((char*)&creds, 0, sizeof(creds));
+ memset (&creds, 0, sizeof(creds));
retval = krb5_cc_get_principal(context, cc, &creds.client);
if (retval) {
com_err("uu-client", retval, "getting principal name");
Modified: trunk/src/clients/ksu/ccache.c
===================================================================
--- trunk/src/clients/ksu/ccache.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/clients/ksu/ccache.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -230,9 +230,9 @@
}
- memset((char *) &temp_tktq, 0, sizeof(temp_tktq));
- memset((char *) &temp_tkt, 0, sizeof(temp_tkt));
- memset((char *) &creds, 0, sizeof(creds));
+ memset(&temp_tktq, 0, sizeof(temp_tktq));
+ memset(&temp_tkt, 0, sizeof(temp_tkt));
+ memset(&creds, 0, sizeof(creds));
/* initialize the cursor */
if ((retval = krb5_cc_start_seq_get(context, cc, &cur))) {
Modified: trunk/src/clients/ksu/heuristic.c
===================================================================
--- trunk/src/clients/ksu/heuristic.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/clients/ksu/heuristic.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -449,8 +449,8 @@
*found = FALSE;
- memset((char *) &tgtq, 0, sizeof(tgtq));
- memset((char *) &tgt, 0, sizeof(tgt));
+ memset(&tgtq, 0, sizeof(tgtq));
+ memset(&tgt, 0, sizeof(tgt));
retval= krb5_copy_principal(context, client, &tgtq.client);
if (retval)
Modified: trunk/src/clients/ksu/krb_auth_su.c
===================================================================
--- trunk/src/clients/ksu/krb_auth_su.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/clients/ksu/krb_auth_su.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -59,9 +59,9 @@
krb5_boolean zero_password;
*path_passwd = 0;
- memset((char *) &tgtq, 0, sizeof(tgtq));
- memset((char *) &tgt, 0, sizeof(tgt));
- memset((char *) &in_creds, 0, sizeof(krb5_creds));
+ memset(&tgtq, 0, sizeof(tgtq));
+ memset(&tgt, 0, sizeof(tgt));
+ memset(&in_creds, 0, sizeof(krb5_creds));
if ((retval= krb5_copy_principal(context, client_pname, &client))){
@@ -241,8 +241,8 @@
krb5_verify_init_creds_opt vfy_opts;
krb5_error_code retval;
- memset((char *) &tgtq, 0, sizeof(tgtq));
- memset((char *) &tgt, 0, sizeof(tgt));
+ memset(&tgtq, 0, sizeof(tgtq));
+ memset(&tgt, 0, sizeof(tgt));
if ((retval= krb5_copy_principal(context, client, &tgtq.client))){
com_err(prog_name, retval,"while copying client principal");
@@ -300,7 +300,7 @@
return (FALSE);
}
- memset((char *)&my_creds, 0, sizeof(my_creds));
+ memset(&my_creds, 0, sizeof(my_creds));
if ((code = krb5_copy_principal(context, client, &my_creds.client))){
com_err (prog_name, code, "while copying principal");
Modified: trunk/src/kadmin/cli/kadmin.c
===================================================================
--- trunk/src/kadmin/cli/kadmin.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/kadmin/cli/kadmin.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -216,7 +216,7 @@
char *db_name = NULL;
char *svcname;
- memset((char *) ¶ms, 0, sizeof(params));
+ memset(¶ms, 0, sizeof(params));
#if defined(USE_KIM)
/* Turn off all password prompting from the KLL */
Modified: trunk/src/kadmin/cli/keytab.c
===================================================================
--- trunk/src/kadmin/cli/keytab.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/kadmin/cli/keytab.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -266,7 +266,7 @@
krb5_keyblock *keys;
int code, nkeys, i;
- (void) memset((char *)&princ_rec, 0, sizeof(princ_rec));
+ (void) memset(&princ_rec, 0, sizeof(princ_rec));
princ = NULL;
keys = NULL;
@@ -309,7 +309,7 @@
}
for (i = 0; i < nkeys; i++) {
- memset((char *) &new_entry, 0, sizeof(new_entry));
+ memset(&new_entry, 0, sizeof(new_entry));
new_entry.principal = princ;
new_entry.key = keys[i];
new_entry.vno = princ_rec.kvno;
Modified: trunk/src/kadmin/dbutil/dump.c
===================================================================
--- trunk/src/kadmin/dbutil/dump.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/kadmin/dbutil/dump.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -1493,7 +1493,7 @@
try2read = (char *) NULL;
(*linenop)++;
retval = 1;
- memset((char *)&dbent, 0, sizeof(dbent));
+ memset(&dbent, 0, sizeof(dbent));
/* Make sure we've got key_data entries */
if (krb5_dbe_create_key_data(kcontext, &dbent) ||
@@ -1794,7 +1794,7 @@
const char *try2read;
try2read = (char *) NULL;
- memset((char *) &dbentry, 0, sizeof(dbentry));
+ memset(&dbentry, 0, sizeof(dbentry));
(*linenop)++;
retval = 1;
name = (char *) NULL;
Modified: trunk/src/kadmin/dbutil/kdb5_create.c
===================================================================
--- trunk/src/kadmin/dbutil/kdb5_create.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/kadmin/dbutil/kdb5_create.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -349,7 +349,7 @@
}
/* clean up */
(void) krb5_db_fini(util_context);
- memset((char *)master_keyblock.contents, 0, master_keyblock.length);
+ memset(master_keyblock.contents, 0, master_keyblock.length);
free(master_keyblock.contents);
if (pw_str) {
memset(pw_str, 0, pw_size);
@@ -426,7 +426,7 @@
int nentries = 1;
krb5_actkvno_node actkvno;
- memset((char *) &entry, 0, sizeof(entry));
+ memset(&entry, 0, sizeof(entry));
entry.len = KRB5_KDB_V1_BASE_LENGTH;
entry.attributes = pblock->flags;
@@ -449,7 +449,7 @@
if ((entry.key_data=(krb5_key_data*)malloc(sizeof(krb5_key_data)))
== NULL)
goto error_out;
- memset((char *) entry.key_data, 0, sizeof(krb5_key_data));
+ memset(entry.key_data, 0, sizeof(krb5_key_data));
entry.n_key_data = 1;
if (global_params.mask & KADM5_CONFIG_KVNO)
Modified: trunk/src/kadmin/dbutil/kdb5_mkey.c
===================================================================
--- trunk/src/kadmin/dbutil/kdb5_mkey.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/kadmin/dbutil/kdb5_mkey.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -99,7 +99,7 @@
if (master_entry->key_data == NULL)
return (ENOMEM);
- memset((char *) master_entry->key_data, 0,
+ memset(master_entry->key_data, 0,
sizeof(krb5_key_data) * (old_key_data_count + 1));
master_entry->n_key_data = old_key_data_count + 1;
@@ -1308,7 +1308,7 @@
exit_status++;
return;
}
- memset((char *) master_entry.key_data, 0, sizeof(krb5_key_data) * num_kvnos_inuse);
+ memset(master_entry.key_data, 0, sizeof(krb5_key_data) * num_kvnos_inuse);
master_entry.n_key_data = num_kvnos_inuse; /* there's only 1 mkey per kvno */
/*
Modified: trunk/src/kadmin/dbutil/kdb5_util.c
===================================================================
--- trunk/src/kadmin/dbutil/kdb5_util.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/kadmin/dbutil/kdb5_util.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -519,7 +519,7 @@
if ((retval = krb5_c_random_seed(util_context, &seed))) {
com_err(progname, retval, "while seeding random number generator");
exit_status++;
- memset((char *)master_keyblock.contents, 0, master_keyblock.length);
+ memset(master_keyblock.contents, 0, master_keyblock.length);
krb5_free_keyblock_contents(util_context, &master_keyblock);
krb5_db_free_mkey_list(util_context, master_keylist);
return(1);
@@ -544,7 +544,7 @@
return 0;
krb5_db_free_mkey_list(util_context, master_keylist);
retval = krb5_db_fini(util_context);
- memset((char *)master_keyblock.contents, 0, master_keyblock.length);
+ memset(master_keyblock.contents, 0, master_keyblock.length);
finished = TRUE;
if (retval && retval != KRB5_KDB_DBNOTINITED) {
com_err(progname, retval, "while closing database");
Modified: trunk/src/kadmin/ktutil/ktutil_funcs.c
===================================================================
--- trunk/src/kadmin/ktutil/ktutil_funcs.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/kadmin/ktutil/ktutil_funcs.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -131,7 +131,7 @@
if (!entry) {
return ENOMEM;
}
- memset((char *) entry, 0, sizeof(*entry));
+ memset(entry, 0, sizeof(*entry));
if (!lp) { /* if list is empty, start one */
lp = (krb5_kt_list) malloc(sizeof(*lp));
@@ -258,7 +258,7 @@
retval = ENOMEM;
break;
}
- memset((char *)entry, 0, sizeof (*entry));
+ memset(entry, 0, sizeof (*entry));
retval = krb5_kt_next_entry(context, kt, entry, &cursor);
if (retval)
break;
Modified: trunk/src/kadmin/server/ipropd_svc.c
===================================================================
--- trunk/src/kadmin/server/ipropd_svc.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/kadmin/server/ipropd_svc.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -542,7 +542,7 @@
svcerr_noproc(transp);
return;
}
- (void) memset((char *)&argument, 0, sizeof (argument));
+ (void) memset(&argument, 0, sizeof (argument));
if (!svc_getargs(transp, _xdr_argument, (caddr_t)&argument)) {
krb5_klog_syslog(LOG_ERR,
_("RPC svc_getargs failed (%s)"),
Modified: trunk/src/kadmin/server/kadm_rpc_svc.c
===================================================================
--- trunk/src/kadmin/server/kadm_rpc_svc.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/kadmin/server/kadm_rpc_svc.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -217,7 +217,7 @@
svcerr_noproc(transp);
return;
}
- memset((char *)&argument, 0, sizeof(argument));
+ memset(&argument, 0, sizeof(argument));
if (!svc_getargs(transp, xdr_argument, &argument)) {
svcerr_decode(transp);
return;
Modified: trunk/src/kadmin/server/ovsec_kadmd.c
===================================================================
--- trunk/src/kadmin/server/ovsec_kadmd.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/kadmin/server/ovsec_kadmd.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -248,7 +248,7 @@
nofork = 0;
- memset((char *) ¶ms, 0, sizeof(params));
+ memset(¶ms, 0, sizeof(params));
argc--; argv++;
while (argc) {
Modified: trunk/src/kdc/kdc_util.c
===================================================================
--- trunk/src/kdc/kdc_util.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/kdc/kdc_util.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -150,9 +150,7 @@
krb5_free_authdata(kdc_context, retdata);
return ENOMEM;
}
- memcpy((char *) retdata[i]->contents,
- (char *)(*ptr)->contents,
- retdata[i]->length);
+ memcpy(retdata[i]->contents, (*ptr)->contents, retdata[i]->length);
ptr++;
i++;
Modified: trunk/src/kdc/main.c
===================================================================
--- trunk/src/kdc/main.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/kdc/main.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -165,7 +165,7 @@
krb5_free_principal(rdp->realm_context, rdp->realm_tgsprinc);
krb5_free_context(rdp->realm_context);
}
- memset((char *) rdp, 0, sizeof(*rdp));
+ memset(rdp, 0, sizeof(*rdp));
free(rdp);
}
@@ -247,7 +247,7 @@
int kdb_open_flags;
krb5_kvno mkvno = IGNORE_VNO;
- memset((char *) rdp, 0, sizeof(kdc_realm_t));
+ memset(rdp, 0, sizeof(kdc_realm_t));
if (!realm) {
kret = EINVAL;
goto whoops;
@@ -814,7 +814,7 @@
fprintf(stderr, "%s: cannot get memory for realm list\n", argv[0]);
exit(1);
}
- memset((char *) kdc_realmlist, 0,
+ memset(kdc_realmlist, 0,
(size_t) (sizeof(kdc_realm_t *) * KRB5_KDC_MAX_REALMS));
/*
Modified: trunk/src/lib/crypto/des/afsstring2key.c
===================================================================
--- trunk/src/lib/crypto/des/afsstring2key.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/crypto/des/afsstring2key.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -142,7 +142,7 @@
(void) mit_des_cbc_cksum (password, key, i, key_sked, ikey);
/* erase key_sked */
- memset((char *)key_sked, 0,sizeof(key_sked));
+ memset(key_sked, 0,sizeof(key_sked));
/* now fix up key parity again */
mit_des_fixup_key_parity(key);
Modified: trunk/src/lib/gssapi/generic/gssapiP_generic.h
===================================================================
--- trunk/src/lib/gssapi/generic/gssapiP_generic.h 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/gssapi/generic/gssapiP_generic.h 2009-02-02 23:41:40 UTC (rev 21875)
@@ -75,7 +75,7 @@
(ptr) += 2;
#define TWRITE_STR(ptr, str, len) \
- memcpy((ptr), (char *) (str), (len)); \
+ memcpy((ptr), (str), (len)); \
(ptr) += (len);
#define TREAD_STR(ptr, str, len) \
Modified: trunk/src/lib/gssapi/krb5/init_sec_context.c
===================================================================
--- trunk/src/lib/gssapi/krb5/init_sec_context.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/gssapi/krb5/init_sec_context.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -131,7 +131,7 @@
krb5_creds in_creds;
k5_mutex_assert_locked(&cred->lock);
- memset((char *) &in_creds, 0, sizeof(krb5_creds));
+ memset(&in_creds, 0, sizeof(krb5_creds));
in_creds.client = in_creds.server = NULL;
if ((code = krb5_copy_principal(context, cred->princ, &in_creds.client)))
Modified: trunk/src/lib/gssapi/krb5/util_crypt.c
===================================================================
--- trunk/src/lib/gssapi/krb5/util_crypt.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/gssapi/krb5/util_crypt.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -345,10 +345,10 @@
&seq_enc_key, 0,
&input, &output));
cleanup_arcfour:
- memset ((void *) seq_enc_key.contents, 0, seq_enc_key.length);
- memset ((void *) usage_key.contents, 0, usage_key.length);
- free ((void *) usage_key.contents);
- free ((void *) seq_enc_key.contents);
+ memset (seq_enc_key.contents, 0, seq_enc_key.length);
+ memset (usage_key.contents, 0, usage_key.length);
+ free (usage_key.contents);
+ free (seq_enc_key.contents);
return (code);
}
@@ -713,10 +713,10 @@
&seq_enc_key, 0,
kiov, kiov_count));
cleanup_arcfour:
- memset ((void *) seq_enc_key.contents, 0, seq_enc_key.length);
- memset ((void *) usage_key.contents, 0, usage_key.length);
- free ((void *) usage_key.contents);
- free ((void *) seq_enc_key.contents);
+ memset (seq_enc_key.contents, 0, seq_enc_key.length);
+ memset (usage_key.contents, 0, usage_key.length);
+ free (usage_key.contents);
+ free (seq_enc_key.contents);
if (kiov != NULL)
free(kiov);
return (code);
Modified: trunk/src/lib/gssapi/spnego/spnego_mech.c
===================================================================
--- trunk/src/lib/gssapi/spnego/spnego_mech.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/gssapi/spnego/spnego_mech.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -2374,7 +2374,7 @@
return (-1);
*(*buf_out)++ = MECH_OID;
*(*buf_out)++ = (unsigned char) mech->length;
- memcpy((void *)(*buf_out), mech->elements, mech->length);
+ memcpy(*buf_out, mech->elements, mech->length);
*buf_out += mech->length;
return (0);
}
Modified: trunk/src/lib/kadm5/alt_prof.c
===================================================================
--- trunk/src/lib/kadm5/alt_prof.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/kadm5/alt_prof.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -525,8 +525,8 @@
krb5_error_code kret = 0;
- memset((char *) ¶ms, 0, sizeof(params));
- memset((char *) &empty_params, 0, sizeof(empty_params));
+ memset(¶ms, 0, sizeof(params));
+ memset(&empty_params, 0, sizeof(empty_params));
if (params_in == NULL) params_in = &empty_params;
@@ -952,7 +952,7 @@
}
/* Initialize realm parameters */
- memset((char *) rparams, 0, sizeof(krb5_realm_params));
+ memset(rparams, 0, sizeof(krb5_realm_params));
/* Get the value for the database */
hierarchy[0] = "realms";
Modified: trunk/src/lib/kadm5/clnt/client_init.c
===================================================================
--- trunk/src/lib/kadm5/clnt/client_init.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/kadm5/clnt/client_init.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -230,7 +230,7 @@
* of params_in. So use that realm, make params_in contain an
* empty mask, and behave like version 2.
*/
- memset((char *) ¶ms_local, 0, sizeof(params_local));
+ memset(¶ms_local, 0, sizeof(params_local));
if (api_version == KADM5_API_VERSION_1) {
realm = params_local.realm = (char *) params_in;
if (params_in)
@@ -319,8 +319,7 @@
memset(&addr, 0, sizeof(addr));
addr.sin_family = hp->h_addrtype;
- (void) memcpy((char *) &addr.sin_addr, (char *) hp->h_addr,
- sizeof(addr.sin_addr));
+ (void) memcpy(&addr.sin_addr, hp->h_addr, sizeof(addr.sin_addr));
if (iprop_enable)
addr.sin_port = htons((u_short) handle->params.iprop_port);
else
Modified: trunk/src/lib/kadm5/clnt/client_rpc.c
===================================================================
--- trunk/src/lib/kadm5/clnt/client_rpc.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/kadm5/clnt/client_rpc.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -16,7 +16,7 @@
{
static generic_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, CREATE_PRINCIPAL,
(xdrproc_t) xdr_cprinc_arg, (caddr_t) argp,
(xdrproc_t) xdr_generic_ret, (caddr_t) &clnt_res,
@@ -31,7 +31,7 @@
{
static generic_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, CREATE_PRINCIPAL3,
(xdrproc_t) xdr_cprinc3_arg, (caddr_t) argp,
(xdrproc_t) xdr_generic_ret, (caddr_t) &clnt_res,
@@ -46,7 +46,7 @@
{
static generic_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, DELETE_PRINCIPAL,
(xdrproc_t) xdr_dprinc_arg, (caddr_t) argp,
(xdrproc_t) xdr_generic_ret, (caddr_t) &clnt_res,
@@ -61,7 +61,7 @@
{
static generic_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, MODIFY_PRINCIPAL,
(xdrproc_t) xdr_mprinc_arg, (caddr_t) argp,
(xdrproc_t) xdr_generic_ret, (caddr_t) &clnt_res,
@@ -76,7 +76,7 @@
{
static generic_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, RENAME_PRINCIPAL,
(xdrproc_t) xdr_rprinc_arg, (caddr_t) argp,
(xdrproc_t) xdr_generic_ret, (caddr_t) &clnt_res,
@@ -91,7 +91,7 @@
{
static gprinc_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, GET_PRINCIPAL,
(xdrproc_t) xdr_gprinc_arg, (caddr_t) argp,
(xdrproc_t) xdr_gprinc_ret, (caddr_t) &clnt_res,
@@ -106,7 +106,7 @@
{
static gprincs_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, GET_PRINCS,
(xdrproc_t) xdr_gprincs_arg, (caddr_t) argp,
(xdrproc_t) xdr_gprincs_ret, (caddr_t) &clnt_res,
@@ -121,7 +121,7 @@
{
static generic_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, CHPASS_PRINCIPAL,
(xdrproc_t) xdr_chpass_arg, (caddr_t) argp,
(xdrproc_t) xdr_generic_ret, (caddr_t) &clnt_res,
@@ -136,7 +136,7 @@
{
static generic_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, CHPASS_PRINCIPAL3,
(xdrproc_t) xdr_chpass3_arg, (caddr_t) argp,
(xdrproc_t) xdr_generic_ret, (caddr_t) &clnt_res,
@@ -151,7 +151,7 @@
{
static generic_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, SETV4KEY_PRINCIPAL,
(xdrproc_t) xdr_setv4key_arg, (caddr_t) argp,
(xdrproc_t) xdr_generic_ret, (caddr_t) &clnt_res,
@@ -166,7 +166,7 @@
{
static generic_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, SETKEY_PRINCIPAL,
(xdrproc_t) xdr_setkey_arg, (caddr_t) argp,
(xdrproc_t) xdr_generic_ret, (caddr_t) &clnt_res,
@@ -181,7 +181,7 @@
{
static generic_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, SETKEY_PRINCIPAL3,
(xdrproc_t) xdr_setkey3_arg, (caddr_t) argp,
(xdrproc_t) xdr_generic_ret, (caddr_t) &clnt_res,
@@ -196,7 +196,7 @@
{
static chrand_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, CHRAND_PRINCIPAL,
(xdrproc_t) xdr_chrand_arg, (caddr_t) argp,
(xdrproc_t) xdr_chrand_ret, (caddr_t) &clnt_res,
@@ -211,7 +211,7 @@
{
static chrand_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, CHRAND_PRINCIPAL3,
(xdrproc_t) xdr_chrand3_arg, (caddr_t) argp,
(xdrproc_t) xdr_chrand_ret, (caddr_t) &clnt_res,
@@ -226,7 +226,7 @@
{
static generic_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, CREATE_POLICY,
(xdrproc_t) xdr_cpol_arg, (caddr_t) argp,
(xdrproc_t) xdr_generic_ret, (caddr_t) &clnt_res,
@@ -241,7 +241,7 @@
{
static generic_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, DELETE_POLICY,
(xdrproc_t) xdr_dpol_arg, (caddr_t) argp,
(xdrproc_t) xdr_generic_ret, (caddr_t) &clnt_res,
@@ -256,7 +256,7 @@
{
static generic_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, MODIFY_POLICY,
(xdrproc_t) xdr_mpol_arg, (caddr_t) argp,
(xdrproc_t) xdr_generic_ret, (caddr_t) &clnt_res,
@@ -271,7 +271,7 @@
{
static gpol_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, GET_POLICY,
(xdrproc_t) xdr_gpol_arg, (caddr_t) argp,
(xdrproc_t) xdr_gpol_ret, (caddr_t) &clnt_res,
@@ -286,7 +286,7 @@
{
static gpols_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, GET_POLS,
(xdrproc_t) xdr_gpols_arg, (caddr_t) argp,
(xdrproc_t) xdr_gpols_ret, (caddr_t) &clnt_res,
@@ -301,7 +301,7 @@
{
static getprivs_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, GET_PRIVS,
(xdrproc_t) xdr_u_int32, (caddr_t) argp,
(xdrproc_t) xdr_getprivs_ret, (caddr_t) &clnt_res,
@@ -316,7 +316,7 @@
{
static generic_ret clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call(clnt, INIT,
(xdrproc_t) xdr_u_int32, (caddr_t) argp,
(xdrproc_t) xdr_generic_ret, (caddr_t) &clnt_res,
Modified: trunk/src/lib/kadm5/kadm_rpc_xdr.c
===================================================================
--- trunk/src/lib/kadm5/kadm_rpc_xdr.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/kadm5/kadm_rpc_xdr.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -230,7 +230,7 @@
unsigned int tmp;
if (xdrs->x_op == XDR_DECODE)
- memset((char *) objp, 0, sizeof(krb5_key_data));
+ memset(objp, 0, sizeof(krb5_key_data));
if (!xdr_krb5_int16(xdrs, &objp->key_data_ver)) {
return (FALSE);
@@ -322,7 +322,7 @@
tl2 = (krb5_tl_data *) malloc(sizeof(krb5_tl_data));
if (tl2 == NULL)
return FALSE;
- memset((char *) tl2, 0, sizeof(krb5_tl_data));
+ memset(tl2, 0, sizeof(krb5_tl_data));
if (!xdr_krb5_int16(xdrs, &tl2->tl_data_type))
return FALSE;
if (!xdr_bytes(xdrs, (char **)&tl2->tl_data_contents, &len, ~0))
Modified: trunk/src/lib/kadm5/srv/server_acl.c
===================================================================
--- trunk/src/lib/kadm5/srv/server_acl.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/kadm5/srv/server_acl.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -607,7 +607,7 @@
wildstate_t state;
DPRINT(DEBUG_CALLS, acl_debug_level, ("* kadm5int_acl_find_entry()\n"));
- memset((char *)&state, 0, sizeof state);
+ memset(&state, 0, sizeof state);
for (entry=acl_list_head; entry; entry = entry->ae_next) {
if (entry->ae_name_bad)
continue;
Modified: trunk/src/lib/kadm5/srv/server_init.c
===================================================================
--- trunk/src/lib/kadm5/srv/server_init.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/kadm5/srv/server_init.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -210,7 +210,7 @@
* of params_in. So use that realm, make params_in contain an
* empty mask, and behave like version 2.
*/
- memset((char *) ¶ms_local, 0, sizeof(params_local));
+ memset(¶ms_local, 0, sizeof(params_local));
if (api_version == KADM5_API_VERSION_1) {
params_local.realm = (char *) params_in;
if (params_in)
Modified: trunk/src/lib/kadm5/srv/svr_principal.c
===================================================================
--- trunk/src/lib/kadm5/srv/svr_principal.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/kadm5/srv/svr_principal.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -764,7 +764,7 @@
mask = in_mask;
}
- memset((char *) entry, 0, sizeof(*entry));
+ memset(entry, 0, sizeof(*entry));
if (principal == NULL)
return EINVAL;
@@ -1184,7 +1184,7 @@
}
free(histp->key_data);
}
- free((void *)adb->old_keys);
+ free(adb->old_keys);
adb->old_keys = tmp;
nkeys = adb->old_key_len = nhist - 1;
knext = adb->old_key_next = 0;
@@ -2155,7 +2155,7 @@
keys = (krb5_keyblock *) malloc(n_key_data*sizeof(krb5_keyblock));
if (keys == NULL)
return ENOMEM;
- memset((char *) keys, 0, n_key_data*sizeof(krb5_keyblock));
+ memset(keys, 0, n_key_data*sizeof(krb5_keyblock));
for (i = 0; i < n_key_data; i++) {
ret = krb5_dbekd_decrypt_key_data(context, mkey,
@@ -2169,7 +2169,7 @@
}
}
- memset((char *) keys, 0, n_key_data*sizeof(krb5_keyblock));
+ memset(keys, 0, n_key_data*sizeof(krb5_keyblock));
free(keys);
return ret;
}
Modified: trunk/src/lib/kadm5/unit-test/setkey-test.c
===================================================================
--- trunk/src/lib/kadm5/unit-test/setkey-test.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/kadm5/unit-test/setkey-test.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -84,7 +84,7 @@
* to kadm5 server.
*/
- memset((char *) &context, 0, sizeof(context));
+ memset(&context, 0, sizeof(context));
kadm5_init_krb5_context(&context);
ret = krb5_parse_name(context, principal, &princ);
@@ -174,7 +174,7 @@
for (encnum = 0; testp[encnum].magic != -1; encnum++) {
printf("+ enctype %d\n", testp[encnum].enctype);
- memset((char *) &ktent, 0, sizeof(ktent));
+ memset(&ktent, 0, sizeof(ktent));
ktent.principal = princ;
ktent.key = testp[encnum];
ktent.vno = princ_ent.kvno;
@@ -185,7 +185,7 @@
exit(1);
}
- memset((char *)&my_creds, 0, sizeof(my_creds));
+ memset(&my_creds, 0, sizeof(my_creds));
my_creds.client = princ;
my_creds.server = server;
Modified: trunk/src/lib/kdb/kdb_cpw.c
===================================================================
--- trunk/src/lib/kdb/kdb_cpw.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/kdb/kdb_cpw.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -449,8 +449,8 @@
if(!(key_salt.data.data = (char *) malloc(slen+1)))
return ENOMEM;
key_salt.data.data[slen] = 0;
- memcpy((char *)key_salt.data.data,
- (char *)(*krb5_princ_realm(context,db_entry->princ)).data,
+ memcpy(key_salt.data.data,
+ (*krb5_princ_realm(context,db_entry->princ)).data,
slen);
key_salt.data.length = SALT_TYPE_AFS_LENGTH; /*length actually used below...*/
#endif
Modified: trunk/src/lib/kdb/kdb_default.c
===================================================================
--- trunk/src/lib/kdb/kdb_default.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/kdb/kdb_default.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -204,7 +204,7 @@
goto out;
while (keylist && !retval) {
- memset((char *) &new_entry, 0, sizeof(new_entry));
+ memset(&new_entry, 0, sizeof(new_entry));
new_entry.principal = mname;
new_entry.key = keylist->keyblock;
new_entry.vno = keylist->kvno;
Modified: trunk/src/lib/krb5/asn.1/asn1glue.h
===================================================================
--- trunk/src/lib/krb5/asn.1/asn1glue.h 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/asn.1/asn1glue.h 2009-02-02 23:41:40 UTC (rev 21875)
@@ -40,7 +40,6 @@
#define KRB5_APOptions2krb5_apoptions(val, err) KRB5_TicketFlags2krb5_flags((struct type_KRB5_APOptions *) (val), err)
/* to keep lint happy */
-#define xbcopy(src,dst,size) memcpy((char *)(dst), (char *)(src), size)
#define xmalloc(n) malloc((unsigned) (n))
#define xcalloc(n,s) calloc((unsigned)(n), (unsigned)(s))
Modified: trunk/src/lib/krb5/ccache/cc_file.c
===================================================================
--- trunk/src/lib/krb5/ccache/cc_file.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/ccache/cc_file.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -1891,7 +1891,7 @@
if (kret)
return kret;
- memset((char *)creds, 0, sizeof(*creds));
+ memset(creds, 0, sizeof(*creds));
MAYBE_OPEN(context, id, FCC_OPEN_RDONLY);
fcursor = (krb5_fcc_cursor *) *cursor;
Modified: trunk/src/lib/krb5/krb/auth_con.c
===================================================================
--- trunk/src/lib/krb5/krb/auth_con.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/auth_con.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -15,7 +15,7 @@
free(tmpad);
return ENOMEM;
}
- memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);
+ memcpy(tmpad->contents, inad->contents, inad->length);
*outad = tmpad;
return 0;
}
Modified: trunk/src/lib/krb5/krb/copy_addrs.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_addrs.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/copy_addrs.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -41,7 +41,7 @@
free(tmpad);
return ENOMEM;
}
- memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);
+ memcpy(tmpad->contents, inad->contents, inad->length);
*outad = tmpad;
return 0;
}
Modified: trunk/src/lib/krb5/krb/copy_auth.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_auth.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/copy_auth.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -68,7 +68,7 @@
free(tmpad);
return ENOMEM;
}
- memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);
+ memcpy(tmpad->contents, inad->contents, inad->length);
*outad = tmpad;
return 0;
}
Modified: trunk/src/lib/krb5/krb/copy_cksum.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_cksum.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/copy_cksum.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -38,13 +38,11 @@
return ENOMEM;
*tempto = *ckfrom;
- if (!(tempto->contents =
- (krb5_octet *)malloc(tempto->length))) {
+ if (!(tempto->contents = (krb5_octet *)malloc(tempto->length))) {
free(tempto);
return ENOMEM;
}
- memcpy((char *) tempto->contents, (char *) ckfrom->contents,
- ckfrom->length);
+ memcpy(tempto->contents, ckfrom->contents, ckfrom->length);
*ckto = tempto;
return 0;
Modified: trunk/src/lib/krb5/krb/copy_data.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_data.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/copy_data.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -68,7 +68,7 @@
if (!(outdata->data = malloc(outdata->length))) {
return ENOMEM;
}
- memcpy((char *)outdata->data, (char *)indata->data, outdata->length);
+ memcpy(outdata->data, indata->data, outdata->length);
} else
outdata->data = 0;
outdata->magic = KV5M_DATA;
Modified: trunk/src/lib/krb5/krb/copy_key.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_key.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/copy_key.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -44,8 +44,7 @@
free(new_key);
return(ENOMEM);
}
- memcpy((char *)new_key->contents, (char *)from->contents,
- new_key->length);
+ memcpy(new_key->contents, from->contents, new_key->length);
*to = new_key;
return 0;
}
Modified: trunk/src/lib/krb5/krb/copy_tick.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_tick.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/copy_tick.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -62,7 +62,7 @@
free(tempto);
return ENOMEM;
}
- memcpy((char *)tempto->transited.tr_contents.data,
+ memcpy(tempto->transited.tr_contents.data,
(char *)partfrom->transited.tr_contents.data,
partfrom->transited.tr_contents.length);
}
Modified: trunk/src/lib/krb5/krb/cp_key_cnt.c
===================================================================
--- trunk/src/lib/krb5/krb/cp_key_cnt.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/cp_key_cnt.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -40,7 +40,7 @@
to->contents = (krb5_octet *)malloc(to->length);
if (!to->contents)
return ENOMEM;
- memcpy((char *)to->contents, (char *)from->contents, to->length);
+ memcpy(to->contents, from->contents, to->length);
} else
to->contents = 0;
return 0;
Modified: trunk/src/lib/krb5/krb/fwd_tgt.c
===================================================================
--- trunk/src/lib/krb5/krb/fwd_tgt.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/fwd_tgt.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -57,8 +57,8 @@
krb5_keyblock *session_key;
krb5_boolean old_use_conf_ktypes = context->use_conf_ktypes;
- memset((char *)&creds, 0, sizeof(creds));
- memset((char *)&tgt, 0, sizeof(creds));
+ memset(&creds, 0, sizeof(creds));
+ memset(&tgt, 0, sizeof(creds));
if (cc == 0) {
if ((retval = krb5int_cc_default(context, &cc)))
Modified: trunk/src/lib/krb5/krb/get_creds.c
===================================================================
--- trunk/src/lib/krb5/krb/get_creds.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/get_creds.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -54,7 +54,7 @@
if (!in_creds || !in_creds->server || !in_creds->client)
return EINVAL;
- memset((char *)mcreds, 0, sizeof(krb5_creds));
+ memset(mcreds, 0, sizeof(krb5_creds));
mcreds->magic = KV5M_CREDS;
if (in_creds->times.endtime != 0) {
mcreds->times.endtime = in_creds->times.endtime;
@@ -122,7 +122,7 @@
if ((ncreds = (krb5_creds *)malloc(sizeof(krb5_creds))) == NULL)
return ENOMEM;
- memset((char *)ncreds, 0, sizeof(krb5_creds));
+ memset(ncreds, 0, sizeof(krb5_creds));
ncreds->magic = KV5M_CREDS;
/* The caller is now responsible for cleaning up in_creds */
@@ -261,7 +261,7 @@
krb5_creds *out_creds = 0; /* for check before dereferencing below */
krb5_creds **tgts;
- memset((char *)&in_creds, 0, sizeof(krb5_creds));
+ memset(&in_creds, 0, sizeof(krb5_creds));
in_creds.server = NULL;
tgts = NULL;
Modified: trunk/src/lib/krb5/krb/get_in_tkt.c
===================================================================
--- trunk/src/lib/krb5/krb/get_in_tkt.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/get_in_tkt.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -428,7 +428,7 @@
if (server)
krb5_free_principal(context, server);
if (creds->keyblock.contents) {
- memset((char *)creds->keyblock.contents, 0,
+ memset(creds->keyblock.contents, 0,
creds->keyblock.length);
free(creds->keyblock.contents);
creds->keyblock.contents = 0;
Modified: trunk/src/lib/krb5/krb/kfree.c
===================================================================
--- trunk/src/lib/krb5/krb/kfree.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/kfree.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -187,7 +187,7 @@
val->server = 0;
}
if (val->keyblock.contents) {
- memset((char *)val->keyblock.contents, 0, val->keyblock.length);
+ memset(val->keyblock.contents, 0, val->keyblock.length);
free(val->keyblock.contents);
val->keyblock.contents = 0;
}
Modified: trunk/src/lib/krb5/krb/mk_priv.c
===================================================================
--- trunk/src/lib/krb5/krb/mk_priv.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/mk_priv.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -119,7 +119,7 @@
krb5_replay_data replaydata;
/* Clear replaydata block */
- memset((char *) &replaydata, 0, sizeof(krb5_replay_data));
+ memset(&replaydata, 0, sizeof(krb5_replay_data));
/* Get keyblock */
if ((keyblock = auth_context->send_subkey) == NULL)
Modified: trunk/src/lib/krb5/krb/mk_req.c
===================================================================
--- trunk/src/lib/krb5/krb/mk_req.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/mk_req.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -65,7 +65,7 @@
return retval;
/* obtain ticket & session key */
- memset((char *)&creds, 0, sizeof(creds));
+ memset(&creds, 0, sizeof(creds));
if ((retval = krb5_copy_principal(context, server, &creds.server)))
goto cleanup_princ;
Modified: trunk/src/lib/krb5/krb/mk_safe.c
===================================================================
--- trunk/src/lib/krb5/krb/mk_safe.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/mk_safe.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -104,7 +104,7 @@
cleanup_checksum:
free(safe_checksum.contents);
- memset((char *)scratch1->data, 0, scratch1->length);
+ memset(scratch1->data, 0, scratch1->length);
krb5_free_data(context, scratch1);
return retval;
}
@@ -119,7 +119,7 @@
krb5_replay_data replaydata;
/* Clear replaydata block */
- memset((char *) &replaydata, 0, sizeof(krb5_replay_data));
+ memset(&replaydata, 0, sizeof(krb5_replay_data));
/* Get keyblock */
if ((keyblock = auth_context->send_subkey) == NULL)
Modified: trunk/src/lib/krb5/krb/rd_safe.c
===================================================================
--- trunk/src/lib/krb5/krb/rd_safe.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/rd_safe.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -128,7 +128,7 @@
KRB5_KEYUSAGE_KRB_SAFE_CKSUM,
scratch, his_cksum, &valid);
- (void) memset((char *)scratch->data, 0, scratch->length);
+ (void) memset(scratch->data, 0, scratch->length);
krb5_free_data(context, scratch);
if (!valid) {
Modified: trunk/src/lib/krb5/krb/recvauth.c
===================================================================
--- trunk/src/lib/krb5/krb/recvauth.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/recvauth.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -177,7 +177,7 @@
krb5_error error;
const char *message;
- memset((char *)&error, 0, sizeof(error));
+ memset(&error, 0, sizeof(error));
krb5_us_timeofday(context, &error.stime, &error.susec);
if(server)
error.server = server;
Modified: trunk/src/lib/krb5/krb/send_tgs.c
===================================================================
--- trunk/src/lib/krb5/krb/send_tgs.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/send_tgs.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -147,7 +147,7 @@
if (!in_cred->ticket.length)
return(KRB5_NO_TKT_SUPPLIED);
- memset((char *)&tgsreq, 0, sizeof(tgsreq));
+ memset(&tgsreq, 0, sizeof(tgsreq));
tgsreq.kdc_options = kdcoptions;
tgsreq.server = (krb5_principal) sname;
Modified: trunk/src/lib/krb5/krb/sendauth.c
===================================================================
--- trunk/src/lib/krb5/krb/sendauth.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/sendauth.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -91,7 +91,7 @@
* If no credentials were provided, try getting it from the
* credentials cache.
*/
- memset((char *)&creds, 0, sizeof(creds));
+ memset(&creds, 0, sizeof(creds));
/*
* See if we need to access the credentials cache
Modified: trunk/src/lib/krb5/krb/t_ser.c
===================================================================
--- trunk/src/lib/krb5/krb/t_ser.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/krb/t_ser.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -562,7 +562,7 @@
checksum.checksum_type = 123;
checksum.length = sizeof(ckdata);
checksum.contents = ckdata;
- memcpy(ckdata, (char *) &stuff, sizeof(ckdata));
+ memcpy(ckdata, &stuff, sizeof(ckdata));
if (!(kret = ser_data(verbose, "> checksum with data",
(krb5_pointer) &checksum, KV5M_CHECKSUM))) {
if (verbose)
Modified: trunk/src/lib/krb5/os/full_ipadr.c
===================================================================
--- trunk/src/lib/krb5/os/full_ipadr.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/os/full_ipadr.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -59,25 +59,25 @@
marshal = retaddr->contents;
temptype = htons(ADDRTYPE_INET);
- (void) memcpy((char *)marshal, (char *)&temptype, sizeof(temptype));
+ (void) memcpy(marshal, &temptype, sizeof(temptype));
marshal += sizeof(temptype);
templength = htonl(sizeof(smushaddr));
- (void) memcpy((char *)marshal, (char *)&templength, sizeof(templength));
+ (void) memcpy(marshal, &templength, sizeof(templength));
marshal += sizeof(templength);
- (void) memcpy((char *)marshal, (char *)&smushaddr, sizeof(smushaddr));
+ (void) memcpy(marshal, &smushaddr, sizeof(smushaddr));
marshal += sizeof(smushaddr);
temptype = htons(ADDRTYPE_IPPORT);
- (void) memcpy((char *)marshal, (char *)&temptype, sizeof(temptype));
+ (void) memcpy(marshal, &temptype, sizeof(temptype));
marshal += sizeof(temptype);
templength = htonl(sizeof(smushport));
- (void) memcpy((char *)marshal, (char *)&templength, sizeof(templength));
+ (void) memcpy(marshal, &templength, sizeof(templength));
marshal += sizeof(templength);
- (void) memcpy((char *)marshal, (char *)&smushport, sizeof(smushport));
+ (void) memcpy(marshal, &smushport, sizeof(smushport));
marshal += sizeof(smushport);
*outaddr = retaddr;
Modified: trunk/src/lib/krb5/os/gen_port.c
===================================================================
--- trunk/src/lib/krb5/os/gen_port.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/os/gen_port.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -41,7 +41,7 @@
return KRB5_PROG_ATYPE_NOSUPP;
port = *(const krb5_int16 *)ptr;
- memcpy((char *)&adr, (char *)addr->contents, sizeof(adr));
+ memcpy(&adr, addr->contents, sizeof(adr));
return krb5_make_full_ipaddr(context, adr, port, outaddr);
#else
return KRB5_PROG_ATYPE_NOSUPP;
Modified: trunk/src/lib/krb5/os/mk_faddr.c
===================================================================
--- trunk/src/lib/krb5/os/mk_faddr.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/os/mk_faddr.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -64,7 +64,7 @@
store_32_le(tmp32, marshal);
marshal += 4;
- (void) memcpy((char *)marshal, (char *)(kaddr->contents), kaddr->length);
+ (void) memcpy(marshal, kaddr->contents, kaddr->length);
marshal += kaddr->length;
tmp16 = kport->addrtype;
@@ -77,7 +77,7 @@
store_32_le(tmp32, marshal);
marshal += 4;
- (void) memcpy((char *)marshal, (char *)(kport->contents), kport->length);
+ (void) memcpy(marshal, kport->contents, kport->length);
marshal += kport->length;
return 0;
}
Modified: trunk/src/lib/krb5/os/port2ip.c
===================================================================
--- trunk/src/lib/krb5/os/port2ip.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/krb5/os/port2ip.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -50,31 +50,31 @@
marshal = inaddr->contents;
- (void) memcpy((char *)&temptype, (char *)marshal, sizeof(temptype));
+ (void) memcpy(&temptype, marshal, sizeof(temptype));
marshal += sizeof(temptype);
if (temptype != htons(ADDRTYPE_INET))
return KRB5_PROG_ATYPE_NOSUPP;
- (void) memcpy((char *)&templength, (char *)marshal, sizeof(templength));
+ (void) memcpy(&templength, marshal, sizeof(templength));
marshal += sizeof(templength);
if (templength != htonl(sizeof(smushaddr)))
return KRB5_PROG_ATYPE_NOSUPP;
- (void) memcpy((char *)&smushaddr, (char *)marshal, sizeof(smushaddr));
+ (void) memcpy(&smushaddr, marshal, sizeof(smushaddr));
/* leave in net order */
marshal += sizeof(smushaddr);
- (void) memcpy((char *)&temptype, (char *)marshal, sizeof(temptype));
+ (void) memcpy(&temptype, marshal, sizeof(temptype));
marshal += sizeof(temptype);
if (temptype != htons(ADDRTYPE_IPPORT))
return KRB5_PROG_ATYPE_NOSUPP;
- (void) memcpy((char *)&templength, (char *)marshal, sizeof(templength));
+ (void) memcpy(&templength, marshal, sizeof(templength));
marshal += sizeof(templength);
if (templength != htonl(sizeof(smushport)))
return KRB5_PROG_ATYPE_NOSUPP;
- (void) memcpy((char *)&smushport, (char *)marshal, sizeof(smushport));
+ (void) memcpy(&smushport, marshal, sizeof(smushport));
/* leave in net order */
*adr = (krb5_int32) smushaddr;
Modified: trunk/src/lib/rpc/auth_gssapi.c
===================================================================
--- trunk/src/lib/rpc/auth_gssapi.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/rpc/auth_gssapi.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -176,8 +176,8 @@
rpc_createerr.cf_error.re_errno = ENOMEM;
goto cleanup;
}
- memset((char *) auth, 0, sizeof(*auth));
- memset((char *) pdata, 0, sizeof(*pdata));
+ memset(auth, 0, sizeof(*auth));
+ memset(pdata, 0, sizeof(*pdata));
auth->ah_ops = &auth_gssapi_ops;
auth->ah_private = (caddr_t) pdata;
@@ -246,7 +246,7 @@
bindp = NULL;
}
- memset((char *) &call_res, 0, sizeof(call_res));
+ memset(&call_res, 0, sizeof(call_res));
next_token:
*gssstat = gss_init_sec_context(minor_stat,
@@ -283,7 +283,7 @@
PRINTF(("gssapi_create: calling GSSAPI_INIT (%d)\n", init_func));
- memset((char *) &call_res, 0, sizeof(call_res));
+ memset(&call_res, 0, sizeof(call_res));
callstat = clnt_call(clnt, init_func,
xdr_authgssapi_init_arg, &call_arg,
xdr_authgssapi_init_res, &call_res,
Modified: trunk/src/lib/rpc/get_myaddress.c
===================================================================
--- trunk/src/lib/rpc/get_myaddress.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/rpc/get_myaddress.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -52,7 +52,7 @@
int
get_myaddress(struct sockaddr_in *addr)
{
- memset((void *) addr, 0, sizeof(*addr));
+ memset(addr, 0, sizeof(*addr));
addr->sin_family = AF_INET;
addr->sin_port = htons(PMAPPORT);
addr->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
Modified: trunk/src/lib/rpc/svc_auth_gssapi.c
===================================================================
--- trunk/src/lib/rpc/svc_auth_gssapi.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/rpc/svc_auth_gssapi.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -169,7 +169,7 @@
/* use AUTH_NONE until there is a client_handle */
rqst->rq_xprt->xp_auth = &svc_auth_none;
- memset((char *) &call_res, 0, sizeof(call_res));
+ memset(&call_res, 0, sizeof(call_res));
creds.client_handle.length = 0;
creds.client_handle.value = NULL;
@@ -185,7 +185,7 @@
PRINTF(("svcauth_gssapi: decoding credentials\n"));
xdrmem_create(&xdrs, cred->oa_base, cred->oa_length, XDR_DECODE);
- memset((char *) &creds, 0, sizeof(creds));
+ memset(&creds, 0, sizeof(creds));
if (! xdr_authgssapi_creds(&xdrs, &creds)) {
PRINTF(("svcauth_gssapi: failed decoding creds\n"));
LOG_MISCERR("protocol error in client credentials");
@@ -691,7 +691,7 @@
client_data = (svc_auth_gssapi_data *) malloc(sizeof(*client_data));
if (client_data == NULL)
return NULL;
- memset((char *) client_data, 0, sizeof(*client_data));
+ memset(client_data, 0, sizeof(*client_data));
L_PRINTF(2, ("create_client: new client_data = %p\n",
(void *) client_data));
Modified: trunk/src/lib/rpc/svc_tcp.c
===================================================================
--- trunk/src/lib/rpc/svc_tcp.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/rpc/svc_tcp.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -156,7 +156,7 @@
set_cloexec_fd(sock);
madesock = TRUE;
}
- memset((char *)&addr, 0, sizeof (addr));
+ memset(&addr, 0, sizeof (addr));
#if HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
addr.sin_len = sizeof(addr);
#endif
Modified: trunk/src/lib/rpc/svc_udp.c
===================================================================
--- trunk/src/lib/rpc/svc_udp.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/rpc/svc_udp.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -123,7 +123,7 @@
set_cloexec_fd(sock);
madesock = TRUE;
}
- memset((char *)&addr, 0, sizeof (addr));
+ memset(&addr, 0, sizeof (addr));
#if HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
addr.sin_len = sizeof(addr);
#endif
@@ -194,7 +194,7 @@
uint32_t replylen;
again:
- memset((char *) &dummy, 0, sizeof(dummy));
+ memset(&dummy, 0, sizeof(dummy));
dummy_iov[0].iov_base = rpc_buffer(xprt);
dummy_iov[0].iov_len = (int) su->su_iosz;
dummy.msg_iov = dummy_iov;
@@ -337,7 +337,7 @@
(type *) mem_alloc((unsigned) (sizeof(type) * (size)))
#define BZERO(addr, type, size) \
- memset((char *) addr, 0, sizeof(type) * (int) (size))
+ memset(addr, 0, sizeof(type) * (int) (size))
/*
* An entry in the cache
Modified: trunk/src/lib/rpc/unit-test/rpc_test_clnt.c
===================================================================
--- trunk/src/lib/rpc/unit-test/rpc_test_clnt.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/rpc/unit-test/rpc_test_clnt.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -11,7 +11,7 @@
{
static char *clnt_res;
- memset((char *)&clnt_res, 0, sizeof (clnt_res));
+ memset(&clnt_res, 0, sizeof (clnt_res));
if (clnt_call(clnt, RPC_TEST_ECHO,
(xdrproc_t) xdr_wrapstring, (caddr_t) argp,
(xdrproc_t) xdr_wrapstring, (caddr_t) &clnt_res,
Modified: trunk/src/lib/rpc/unit-test/rpc_test_svc.c
===================================================================
--- trunk/src/lib/rpc/unit-test/rpc_test_svc.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/lib/rpc/unit-test/rpc_test_svc.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -53,7 +53,7 @@
_rpcsvcstate = _SERVED;
return;
}
- (void) memset((char *)&argument, 0, sizeof (argument));
+ (void) memset(&argument, 0, sizeof (argument));
if (!svc_getargs(transp, xdr_argument, &argument)) {
svcerr_decode(transp);
_rpcsvccount--;
Modified: trunk/src/plugins/kdb/db2/kdb_db2.c
===================================================================
--- trunk/src/plugins/kdb/db2/kdb_db2.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/plugins/kdb/db2/kdb_db2.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -180,7 +180,7 @@
/*
* Clear the structure and reset the defaults.
*/
- memset((char *) dbctx, 0, sizeof(krb5_db2_context));
+ memset(dbctx, 0, sizeof(krb5_db2_context));
dbctx->db_name = default_db_name;
dbctx->db_nb_locks = FALSE;
dbctx->tempdb = FALSE;
@@ -199,7 +199,7 @@
if (db_ctx == NULL)
return ENOMEM;
else {
- memset((char *) db_ctx, 0, sizeof(krb5_db2_context));
+ memset(db_ctx, 0, sizeof(krb5_db2_context));
k5db2_clear_context((krb5_db2_context *) db_ctx);
dal_handle->db_context = (void *) db_ctx;
}
@@ -1113,7 +1113,7 @@
case 0:
;
}
- memset((char *) &entry, 0, sizeof(entry));
+ memset(&entry, 0, sizeof(entry));
contdata.data = contents.data;
contdata.length = contents.size;
retval = krb5_decode_princ_contents(context, &contdata, &entry);
@@ -1124,7 +1124,7 @@
/* Clear encrypted key contents */
for (i = 0; i < entry.n_key_data; i++) {
if (entry.key_data[i].key_data_length[0]) {
- memset((char *) entry.key_data[i].key_data_contents[0], 0,
+ memset(entry.key_data[i].key_data_contents[0], 0,
(unsigned) entry.key_data[i].key_data_length[0]);
}
}
Modified: trunk/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c
===================================================================
--- trunk/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -121,8 +121,8 @@
|| ((mask & LDAP_REALM_KRBTICKETFLAGS) == 0)) {
kadm5_config_params params_in, params_out;
- memset((char *) ¶ms_in, 0, sizeof(params_in));
- memset((char *) ¶ms_out, 0, sizeof(params_out));
+ memset(¶ms_in, 0, sizeof(params_in));
+ memset(¶ms_out, 0, sizeof(params_out));
retval = kadm5_get_config_params(context, 1, ¶ms_in, ¶ms_out);
if (retval) {
Modified: trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_krbcontainer.c
===================================================================
--- trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_krbcontainer.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_krbcontainer.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -86,7 +86,7 @@
cparams =(krb5_ldap_krbcontainer_params *) malloc(sizeof(krb5_ldap_krbcontainer_params));
CHECK_NULL(cparams);
- memset((char *) cparams, 0, sizeof(krb5_ldap_krbcontainer_params));
+ memset(cparams, 0, sizeof(krb5_ldap_krbcontainer_params));
/* read kerberos containter location from [dbmodules] section of krb5.conf file */
if (ldap_context->conf_section) {
Modified: trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c
===================================================================
--- trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -1224,7 +1224,7 @@
/* Initialize realm container structure */
rlparams =(krb5_ldap_realm_params *) malloc(sizeof(krb5_ldap_realm_params));
CHECK_NULL(rlparams);
- memset((char *) rlparams, 0, sizeof(krb5_ldap_realm_params));
+ memset(rlparams, 0, sizeof(krb5_ldap_realm_params));
/* allocate tl_data structure to store MASK information */
rlparams->tl_data = malloc (sizeof(krb5_tl_data));
@@ -1232,7 +1232,7 @@
st = ENOMEM;
goto cleanup;
}
- memset((char *) rlparams->tl_data, 0, sizeof(krb5_tl_data));
+ memset(rlparams->tl_data, 0, sizeof(krb5_tl_data));
rlparams->tl_data->tl_data_type = KDB_TL_USER_INFO;
/* set the mask parameter to 0 */
Modified: trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c
===================================================================
--- trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -132,7 +132,7 @@
st = ENOMEM;
goto rp_exit;
}
- memcpy((char *)(*password), start, len);
+ memcpy(*password, start, len);
(*password)[len] = '\0';
(*password)[len + 1] = '\0';
goto got_password;
Modified: trunk/src/slave/kprop.c
===================================================================
--- trunk/src/slave/kprop.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/slave/kprop.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -262,7 +262,7 @@
*
* Construct the principal name for the slave host.
*/
- memset((char *)&creds, 0, sizeof(creds));
+ memset(&creds, 0, sizeof(creds));
retval = krb5_sname_to_principal(context,
slave_host, KPROP_SERVICE_NAME,
KRB5_NT_SRV_HST, &creds.server);
@@ -342,7 +342,7 @@
return(0);
}
my_sin.sin_family = hp->h_addrtype;
- memcpy((char *)&my_sin.sin_addr, hp->h_addr, sizeof(my_sin.sin_addr));
+ memcpy(&my_sin.sin_addr, hp->h_addr, sizeof(my_sin.sin_addr));
if(!port) {
sp = getservbyname(KPROP_SERVICE, "tcp");
if (sp == 0) {
@@ -372,7 +372,7 @@
receiver_addr.addrtype = ADDRTYPE_INET;
receiver_addr.length = sizeof(my_sin.sin_addr);
receiver_addr.contents = (krb5_octet *) malloc(sizeof(my_sin.sin_addr));
- memcpy((char *) receiver_addr.contents, (char *) &my_sin.sin_addr,
+ memcpy(receiver_addr.contents, &my_sin.sin_addr,
sizeof(my_sin.sin_addr));
socket_length = sizeof(my_sin);
@@ -385,7 +385,7 @@
sender_addr.addrtype = ADDRTYPE_INET;
sender_addr.length = sizeof(my_sin.sin_addr);
sender_addr.contents = (krb5_octet *) malloc(sizeof(my_sin.sin_addr));
- memcpy((char *) sender_addr.contents, (char *) &my_sin.sin_addr,
+ memcpy(sender_addr.contents, &my_sin.sin_addr,
sizeof(my_sin.sin_addr));
return(0);
@@ -672,7 +672,7 @@
exit(1);
}
- memcpy((char *)&send_size, outbuf.data, sizeof(send_size));
+ memcpy(&send_size, outbuf.data, sizeof(send_size));
send_size = ntohl(send_size);
if (send_size != database_size) {
com_err(progname, 0,
@@ -696,7 +696,7 @@
const char *text;
krb5_data outbuf;
- memset((char *)&error, 0, sizeof(error));
+ memset(&error, 0, sizeof(error));
krb5_us_timeofday(context, &error.ctime, &error.cusec);
error.server = my_creds->server;
error.client = my_principal;
Modified: trunk/src/slave/kpropd.c
===================================================================
--- trunk/src/slave/kpropd.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/slave/kpropd.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -276,7 +276,7 @@
com_err(progname, errno, "while obtaining socket");
exit(1);
}
- memset((char *) &my_sin,0, sizeof(my_sin));
+ memset(&my_sin,0, sizeof(my_sin));
if(!port) {
sp = getservbyname(KPROP_SERVICE, "tcp");
if (sp == NULL) {
@@ -361,7 +361,7 @@
int child_pid;
int status;
- memset((char *)&frominet, 0, sizeof(frominet));
+ memset(&frominet, 0, sizeof(frominet));
fromlen = sizeof(frominet);
if (debug)
fprintf(stderr, "waiting for a kprop connection\n");
@@ -1019,7 +1019,7 @@
static const char tmp[] = ".temp";
kdb_log_context *log_ctx;
- (void) memset((char *)¶ms, 0, sizeof (params));
+ (void) memset(¶ms, 0, sizeof (params));
retval = krb5_init_context(&kpropd_context);
if (retval) {
@@ -1221,7 +1221,7 @@
sender_addr.addrtype = ADDRTYPE_INET;
sender_addr.length = sizeof(my_sin.sin_addr);
sender_addr.contents = (krb5_octet *) malloc(sizeof(my_sin.sin_addr));
- memcpy((char *) sender_addr.contents, (char *) &my_sin.sin_addr,
+ memcpy(sender_addr.contents, &my_sin.sin_addr,
sizeof(my_sin.sin_addr));
sin_length = sizeof(r_sin);
@@ -1233,7 +1233,7 @@
receiver_addr.addrtype = ADDRTYPE_INET;
receiver_addr.length = sizeof(r_sin.sin_addr);
receiver_addr.contents = (krb5_octet *) malloc(sizeof(r_sin.sin_addr));
- memcpy((char *) receiver_addr.contents, (char *) &r_sin.sin_addr,
+ memcpy(receiver_addr.contents, &r_sin.sin_addr,
sizeof(r_sin.sin_addr));
if (debug) {
@@ -1410,7 +1410,7 @@
"while decoding database size from client");
exit(1);
}
- memcpy((char *) &database_size, outbuf.data, sizeof(database_size));
+ memcpy(&database_size, outbuf.data, sizeof(database_size));
krb5_free_data_contents(context, &inbuf);
krb5_free_data_contents(context, &outbuf);
database_size = ntohl(database_size);
@@ -1508,7 +1508,7 @@
krb5_data outbuf;
char buf[1024];
- memset((char *)&error, 0, sizeof(error));
+ memset(&error, 0, sizeof(error));
krb5_us_timeofday(context, &error.stime, &error.susec);
error.server = server;
error.client = client;
Modified: trunk/src/slave/kpropd_rpc.c
===================================================================
--- trunk/src/slave/kpropd_rpc.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/slave/kpropd_rpc.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -14,7 +14,7 @@
{
static char clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, IPROP_NULL,
(xdrproc_t) xdr_void, (caddr_t) argp,
(xdrproc_t) xdr_void, (caddr_t) &clnt_res,
@@ -29,7 +29,7 @@
{
static kdb_incr_result_t clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, IPROP_GET_UPDATES,
(xdrproc_t) xdr_kdb_last_t, (caddr_t) argp,
(xdrproc_t) xdr_kdb_incr_result_t, (caddr_t) &clnt_res,
@@ -44,7 +44,7 @@
{
static kdb_fullresync_result_t clnt_res;
- memset((char *)&clnt_res, 0, sizeof(clnt_res));
+ memset(&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, IPROP_FULL_RESYNC,
(xdrproc_t) xdr_void, (caddr_t) argp,
(xdrproc_t) xdr_kdb_fullresync_result_t, (caddr_t) &clnt_res,
Modified: trunk/src/slave/kproplog.c
===================================================================
--- trunk/src/slave/kproplog.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/slave/kproplog.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -397,7 +397,7 @@
exit(1);
}
- (void) memset((char *)&upd, 0, sizeof (kdb_incr_update_t));
+ (void) memset(&upd, 0, sizeof (kdb_incr_update_t));
xdrmem_create(&xdrs, (char *)indx_log->entry_data,
indx_log->kdb_entry_size, XDR_DECODE);
if (!xdr_kdb_incr_update_t(&xdrs, &upd)) {
@@ -498,7 +498,7 @@
exit(1);
}
- (void) memset((char *)¶ms, 0, sizeof (params));
+ (void) memset(¶ms, 0, sizeof (params));
if (kadm5_get_config_params(context, 1, ¶ms, ¶ms)) {
(void) fprintf(stderr,
Modified: trunk/src/tests/create/kdb5_mkdums.c
===================================================================
--- trunk/src/tests/create/kdb5_mkdums.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/tests/create/kdb5_mkdums.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -195,7 +195,7 @@
}
retval = krb5_db_fini(test_context);
- memset((char *)master_keyblock.contents, 0,
+ memset(master_keyblock.contents, 0,
(size_t) master_keyblock.length);
if (retval && retval != KRB5_KDB_DBNOTINITED) {
com_err(progname, retval, "while closing database");
@@ -218,7 +218,7 @@
krb5_db_entry newentry;
char princ_name[4096];
- memset((char *)&newentry, 0, sizeof(newentry));
+ memset(&newentry, 0, sizeof(newentry));
snprintf(princ_name, sizeof(princ_name), "%s@%s", str_newprinc, cur_realm);
if ((retval = krb5_parse_name(context, princ_name, &newprinc))) {
com_err(progname, retval, "while parsing '%s'", princ_name);
Modified: trunk/src/tests/gss-threads/gss-client.c
===================================================================
--- trunk/src/tests/gss-threads/gss-client.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/tests/gss-threads/gss-client.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -112,7 +112,7 @@
}
saddr.sin_family = hp->h_addrtype;
- memcpy((char *)&saddr.sin_addr, hp->h_addr, sizeof(saddr.sin_addr));
+ memcpy(&saddr.sin_addr, hp->h_addr, sizeof(saddr.sin_addr));
saddr.sin_port = htons(port);
return 0;
}
Modified: trunk/src/tests/hammer/kdc5_hammer.c
===================================================================
--- trunk/src/tests/hammer/kdc5_hammer.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/tests/hammer/kdc5_hammer.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -340,7 +340,7 @@
service);
/* Initialize variables */
- memset((char *)&creds, 0, sizeof(creds));
+ memset(&creds, 0, sizeof(creds));
/* Do client side */
if (asprintf(&sname, "%s@%s", service, hostname) >= 0) {
@@ -466,7 +466,7 @@
return(-1);
}
- memset((char *)&my_creds, 0, sizeof(my_creds));
+ memset(&my_creds, 0, sizeof(my_creds));
if ((code = krb5_parse_name (context, p_client_str, p_client))) {
com_err (prog, code, "when parsing name %s", p_client_str);
Modified: trunk/src/tests/misc/test_getsockname.c
===================================================================
--- trunk/src/tests/misc/test_getsockname.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/tests/misc/test_getsockname.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -46,9 +46,9 @@
}
/* Set server's address */
- (void) memset((char *)&s_sock, 0, sizeof(s_sock));
+ (void) memset(&s_sock, 0, sizeof(s_sock));
- memcpy((char *)&s_sock.sin_addr, host->h_addr, sizeof(s_sock.sin_addr));
+ memcpy(&s_sock.sin_addr, host->h_addr, sizeof(s_sock.sin_addr));
#ifdef DEBUG
printf("s_sock.sin_addr is %s\n", inet_ntoa(s_sock.sin_addr));
#endif
@@ -61,7 +61,7 @@
exit(1);
}
- memset((char *)&c_sock, 0, sizeof(c_sock));
+ memset(&c_sock, 0, sizeof(c_sock));
c_sock.sin_family = AF_INET;
/* Bind it to set the address; kernel will fill in port # */
@@ -78,7 +78,7 @@
}
/* Get my address */
- memset((char *) &c_sock, 0, sizeof(c_sock));
+ memset(&c_sock, 0, sizeof(c_sock));
i = sizeof(c_sock);
if (getsockname(sock, (struct sockaddr *)&c_sock, &i) < 0) {
perror("getsockname");
Modified: trunk/src/tests/verify/kdb5_verify.c
===================================================================
--- trunk/src/tests/verify/kdb5_verify.c 2009-02-02 22:28:34 UTC (rev 21874)
+++ trunk/src/tests/verify/kdb5_verify.c 2009-02-02 23:41:40 UTC (rev 21875)
@@ -209,7 +209,7 @@
krb5_finish_key(context, &master_encblock);
retval = krb5_db_fini(context);
- memset((char *)master_keyblock.contents, 0, (size_t) master_keyblock.length);
+ memset(master_keyblock.contents, 0, (size_t) master_keyblock.length);
if (retval && retval != KRB5_KDB_DBNOTINITED) {
com_err(progname, retval, "while closing database");
exit(1);
More information about the cvs-krb5
mailing list