Index: aim.c
===================================================================
--- aim.c	(revision 029a8b5aef48f9c708481768705d44bd97d1843c)
+++ aim.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -346,5 +346,5 @@
   aim_conn_t *cur;
   /*
-  OscarData *od = (OscarData *)g->proto_data;
+  OscarData *od = g->proto_data;
   char *name, *exchange;
   */
@@ -429,5 +429,5 @@
 
   aimsess=owl_global_get_aimsess(&g);
-  priv = (struct owlfaim_priv *)aimsess->aux_data;
+  priv = aimsess->aux_data;
 
   /* do a select without blocking */
@@ -479,5 +479,5 @@
 static int faimtest_parse_login(aim_session_t *sess, aim_frame_t *fr, ...)
 {
-  struct owlfaim_priv *priv = (struct owlfaim_priv *)sess->aux_data;
+  struct owlfaim_priv *priv = sess->aux_data;
   struct client_info_s info = CLIENTINFO_AIM_KNOWNGOOD;
     
@@ -703,5 +703,5 @@
 static int faimtest_parse_connerr(aim_session_t *sess, aim_frame_t *fr, ...)
 {
-  struct owlfaim_priv *priv = (struct owlfaim_priv *)sess->aux_data;
+  struct owlfaim_priv *priv = sess->aux_data;
   va_list ap;
   fu16_t code;
@@ -879,5 +879,5 @@
 static int faimtest_reportinterval(aim_session_t *sess, aim_frame_t *fr, ...)
 {
-  struct owlfaim_priv *priv = (struct owlfaim_priv *)sess->aux_data;
+  struct owlfaim_priv *priv = sess->aux_data;
   va_list ap;
   fu16_t interval;
@@ -944,5 +944,5 @@
 static int getaimdata(aim_session_t *sess, unsigned char **bufret, int *buflenret, unsigned long offset, unsigned long len, const char *modname)
 {
-  struct owlfaim_priv *priv = (struct owlfaim_priv *)sess->aux_data;
+  struct owlfaim_priv *priv = sess->aux_data;
   FILE *f;
   static const char defaultmod[] = "aim.exe";
@@ -1069,5 +1069,5 @@
 static int faimtest_memrequest(aim_session_t *sess, aim_frame_t *fr, ...)
 {
-  struct owlfaim_priv *priv = (struct owlfaim_priv *)sess->aux_data;
+  struct owlfaim_priv *priv = sess->aux_data;
   va_list ap;
   fu32_t offset, len;
@@ -1168,5 +1168,5 @@
 static int faimtest_parse_incoming_im_chan1(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *userinfo, struct aim_incomingim_ch1_args *args)
 {
-  struct owlfaim_priv *priv = (struct owlfaim_priv *)sess->aux_data;
+  struct owlfaim_priv *priv = sess->aux_data;
   owl_message *m;
   char *stripmsg, *nz_screenname, *wrapmsg;
Index: cmd.c
===================================================================
--- cmd.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ cmd.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -39,5 +39,5 @@
 
 owl_cmd *owl_cmddict_find(owl_cmddict *d, char *name) {
-  return (owl_cmd*)owl_dict_find_element(d, name);
+  return owl_dict_find_element(d, name);
 }
 
@@ -51,5 +51,5 @@
   cmd = owl_malloc(sizeof(owl_cmd));
   owl_cmd_create_alias(cmd, alias_from, alias_to);
-  owl_dict_insert_element(cd, cmd->name, (void*)cmd, (void(*)(void*))owl_cmd_free);    
+  owl_dict_insert_element(cd, cmd->name, cmd, (void(*)(void*))owl_cmd_free);    
   return(0);
 }
@@ -62,5 +62,5 @@
   }
   owl_perlconfig_new_command(cmd->name);
-  return owl_dict_insert_element(cd, newcmd->name, (void*)newcmd, (void(*)(void*))owl_cmd_free);
+  return owl_dict_insert_element(cd, newcmd->name, newcmd, (void(*)(void*))owl_cmd_free);
 }
 
@@ -70,5 +70,5 @@
 
   if (!strcmp(argv[0], "")) {
-  } else if (NULL != (cmd = (owl_cmd*)owl_dict_find_element(cd, argv[0]))) {
+  } else if (NULL != (cmd = owl_dict_find_element(cd, argv[0]))) {
     retval = owl_cmd_execute(cmd, cd, ctx, argc, argv, buff);
   } else {
Index: commands.c
===================================================================
--- commands.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ commands.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -2439,5 +2439,5 @@
       i--;      /* Accept 1-based indexing */
       if(i < owl_list_get_size(fl)) {
-        f = (owl_filter*)owl_list_get_element(fl, i);
+        f = owl_list_get_element(fl, i);
         owl_list_remove_element(fl, i);
         owl_filter_free(f);
Index: context.c
===================================================================
--- context.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ context.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -70,5 +70,5 @@
 void owl_context_set_popless(owl_context *ctx, owl_viewwin *vw)
 {
-  ctx->data = (void*)vw;
+  ctx->data = vw;
   SET_ACTIVE(ctx, OWL_CTX_POPLESS);
 }
@@ -81,5 +81,5 @@
 void owl_context_set_editmulti(owl_context *ctx, owl_editwin *ew)
 {
-  ctx->data = (void*)ew;
+  ctx->data = ew;
   SET_ACTIVE(ctx, OWL_CTX_EDITMULTI);
 }
@@ -87,5 +87,5 @@
 void owl_context_set_editline(owl_context *ctx, owl_editwin *ew)
 {
-  ctx->data = (void*)ew;
+  ctx->data = ew;
   SET_ACTIVE(ctx, OWL_CTX_EDITLINE);
 }
@@ -93,5 +93,5 @@
 void owl_context_set_editresponse(owl_context *ctx, owl_editwin *ew)
 {
-  ctx->data = (void*)ew;
+  ctx->data = ew;
   SET_ACTIVE(ctx, OWL_CTX_EDITRESPONSE);
 }
Index: dict.c
===================================================================
--- dict.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ dict.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -18,5 +18,5 @@
 int owl_dict_create(owl_dict *d) {
   d->size=0;
-  d->els=(owl_dict_el *)owl_malloc(INITSIZE*sizeof(owl_dict_el));
+  d->els=owl_malloc(INITSIZE*sizeof(owl_dict_el));
   d->avail=INITSIZE;
   if (d->els==NULL) return(-1);
@@ -61,5 +61,5 @@
   for (i=0; i<d->size; i++) {
     if ((dupk = owl_strdup(d->els[i].k)) == NULL) return(-1);
-    owl_list_append_element(l, (void*)dupk);
+    owl_list_append_element(l, dupk);
   }
   return(0);
@@ -95,5 +95,5 @@
     if (pos!=d->size) {
       /* shift forward to leave us a slot */
-      memmove((void*)(d->els+pos+1), (void*)(d->els+pos), 
+      memmove(d->els+pos+1, d->els+pos, 
 	      sizeof(owl_dict_el)*(d->size-pos));
     }
@@ -152,15 +152,15 @@
   printf("# BEGIN testing owl_dict\n");
   FAIL_UNLESS("create", 0==owl_dict_create(&d));
-  FAIL_UNLESS("insert b", 0==owl_dict_insert_element(&d, "b", (void*)bv, owl_dict_noop_free));
-  FAIL_UNLESS("insert d", 0==owl_dict_insert_element(&d, "d", (void*)dv, owl_dict_noop_free));
-  FAIL_UNLESS("insert a", 0==owl_dict_insert_element(&d, "a", (void*)av, owl_dict_noop_free));
-  FAIL_UNLESS("insert c", 0==owl_dict_insert_element(&d, "c", (void*)cv, owl_dict_noop_free));
-  FAIL_UNLESS("reinsert d (no replace)", -2==owl_dict_insert_element(&d, "d", (void*)dv, 0));
-  FAIL_UNLESS("find a", (void*)av==owl_dict_find_element(&d, "a"));
-  FAIL_UNLESS("find b", (void*)bv==owl_dict_find_element(&d, "b"));
-  FAIL_UNLESS("find c", (void*)cv==owl_dict_find_element(&d, "c"));
-  FAIL_UNLESS("find d", (void*)dv==owl_dict_find_element(&d, "d"));
+  FAIL_UNLESS("insert b", 0==owl_dict_insert_element(&d, "b", bv, owl_dict_noop_free));
+  FAIL_UNLESS("insert d", 0==owl_dict_insert_element(&d, "d", dv, owl_dict_noop_free));
+  FAIL_UNLESS("insert a", 0==owl_dict_insert_element(&d, "a", av, owl_dict_noop_free));
+  FAIL_UNLESS("insert c", 0==owl_dict_insert_element(&d, "c", cv, owl_dict_noop_free));
+  FAIL_UNLESS("reinsert d (no replace)", -2==owl_dict_insert_element(&d, "d", dv, 0));
+  FAIL_UNLESS("find a", av==owl_dict_find_element(&d, "a"));
+  FAIL_UNLESS("find b", bv==owl_dict_find_element(&d, "b"));
+  FAIL_UNLESS("find c", cv==owl_dict_find_element(&d, "c"));
+  FAIL_UNLESS("find d", dv==owl_dict_find_element(&d, "d"));
   FAIL_UNLESS("find e (non-existent)", NULL==owl_dict_find_element(&d, "e"));
-  FAIL_UNLESS("remove d", (void*)dv==owl_dict_remove_element(&d, "d"));
+  FAIL_UNLESS("remove d", dv==owl_dict_remove_element(&d, "d"));
   FAIL_UNLESS("find d (post-removal)", NULL==owl_dict_find_element(&d, "d"));
 
Index: fmtext.c
===================================================================
--- fmtext.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ fmtext.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -785,5 +785,5 @@
   size = owl_list_get_size(l);
   for (i=0; i<size; i++) {
-    elem = (char*)owl_list_get_element(l,i);
+    elem = owl_list_get_element(l,i);
     if (elem && format_fn) {
       text = format_fn(elem);
Index: keymap.c
===================================================================
--- keymap.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ keymap.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -44,5 +44,5 @@
    */
   for (i = owl_list_get_size(&km->bindings)-1; i>=0; i--) {
-    curkb = (owl_keybinding*)owl_list_get_element(&km->bindings, i);
+    curkb = owl_list_get_element(&km->bindings, i);
     if (owl_keybinding_equal(curkb, kb)) {
       owl_list_remove_element(&km->bindings, i);
@@ -152,5 +152,5 @@
 {
   owl_keymap *km;
-  km = (owl_keymap*)owl_malloc(sizeof(owl_keymap));
+  km = owl_malloc(sizeof(owl_keymap));
   if (!km) return NULL;
   owl_keymap_init(km, name, desc, default_fn, prealways_fn, postalways_fn);
@@ -169,5 +169,5 @@
 owl_keymap *owl_keyhandler_get_keymap(owl_keyhandler *kh, char *mapname)
 {
-  return (owl_keymap*)owl_dict_find_element(&kh->keymaps, mapname);
+  return owl_dict_find_element(&kh->keymaps, mapname);
 }
 
@@ -191,5 +191,5 @@
   owl_keymap *km;
   if (kh->active && !strcmp(mapname, kh->active->name)) return(kh->active);
-  km = (owl_keymap*)owl_dict_find_element(&kh->keymaps, mapname);
+  km = owl_dict_find_element(&kh->keymaps, mapname);
   if (!km) return(NULL);
   owl_keyhandler_reset(kh);
@@ -240,5 +240,5 @@
   for (km=kh->active; km; km=km->submap) {
     for (i=owl_list_get_size(&km->bindings)-1; i>=0; i--) {
-      kb = (owl_keybinding*)owl_list_get_element(&km->bindings, i);
+      kb = owl_list_get_element(&km->bindings, i);
       match = owl_keybinding_match(kb, kh);
       if (match == 1) {		/* subset match */
Index: list.c
===================================================================
--- list.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ list.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -8,5 +8,5 @@
 {
   l->size=0;
-  l->list=(void **)owl_malloc(INITSIZE*sizeof(void *));
+  l->list=owl_malloc(INITSIZE*sizeof(void *));
   l->avail=INITSIZE;
   if (l->list==NULL) return(-1);
Index: message.c
===================================================================
--- message.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ message.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -808,5 +808,5 @@
   /* save the hostname */
   owl_function_debugmsg("About to do gethostbyaddr");
-  hent=gethostbyaddr((char *) &(n->z_uid.zuid_addr), sizeof(n->z_uid.zuid_addr), AF_INET);
+  hent=gethostbyaddr(&(n->z_uid.zuid_addr), sizeof(n->z_uid.zuid_addr), AF_INET);
   if (hent && hent->h_name) {
     owl_message_set_hostname(m, hent->h_name);
Index: obarray.c
===================================================================
--- obarray.c	(revision af1920fd98d8d860245a197dee998e0e5c337285)
+++ obarray.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -25,5 +25,5 @@
   while(first <= last) {
     mid = first + (last - first)/2;
-    str = (char*)owl_list_get_element(&(oa->strings), mid);
+    str = owl_list_get_element(&(oa->strings), mid);
     cmp = strcmp(key, str);
     if(cmp == 0) {
Index: owl.c
===================================================================
--- owl.c	(revision 0bf6757e6eaaf34cb8690e6fa5613901c73c1a82)
+++ owl.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -693,5 +693,5 @@
 
   if (rfd<0) return;
-  if (-1 == ioctl(rfd, FIONREAD, (void*)&navail)) {
+  if (-1 == ioctl(rfd, FIONREAD, &navail)) {
     return;
   }
Index: perlconfig.c
===================================================================
--- perlconfig.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ perlconfig.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -307,5 +307,5 @@
   PERL_SYS_INIT3(Pargc, Pargv, Penv);
   p=perl_alloc();
-  owl_global_set_perlinterp(&g, (void*)p);
+  owl_global_set_perlinterp(&g, p);
   perl_construct(p);
 
@@ -497,5 +497,5 @@
 void owl_perlconfig_dispatch_free(owl_dispatch *d)
 {
-  SvREFCNT_dec((SV*)d->data);
+  SvREFCNT_dec(d->data);
   owl_free(d);
 }
@@ -503,5 +503,5 @@
 void owl_perlconfig_edit_callback(owl_editwin *e)
 {
-  SV *cb = (SV*)owl_editwin_get_cbdata(e);
+  SV *cb = owl_editwin_get_cbdata(e);
   SV *text;
   dSP;
Index: popexec.c
===================================================================
--- popexec.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ popexec.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -108,5 +108,5 @@
   }
 
-  if (0 != (rv_navail = ioctl(d->fd, FIONREAD, (void*)&navail))) {
+  if (0 != (rv_navail = ioctl(d->fd, FIONREAD, &navail))) {
     owl_function_debugmsg("ioctl error");
   }
@@ -160,5 +160,5 @@
 void owl_popexec_viewwin_onclose(owl_viewwin *vwin, void *data)
 {
-  owl_popexec *pe = (owl_popexec*)data;
+  owl_popexec *pe = data;
   int status, rv;
 
Index: select.c
===================================================================
--- select.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ select.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -90,5 +90,5 @@
   len = owl_list_get_size(dl);
   for(i = 0; i < len; i++) {
-    d = (owl_dispatch*)owl_list_get_element(dl, i);
+    d = owl_list_get_element(dl, i);
     if (d->fd == fd) return i;
   }
@@ -102,5 +102,5 @@
 
   dl = owl_global_get_dispatchlist(&g);
-  d = (owl_dispatch*)owl_list_get_element(dl, elt);
+  d = owl_list_get_element(dl, elt);
   owl_list_remove_element(dl, elt);
   if (d->destroy) {
@@ -122,5 +122,5 @@
   if (elt != -1) {  /* If we have a dispatch for this FD */
     owl_dispatch *d_old;
-    d_old = (owl_dispatch*)owl_list_get_element(dl, elt);
+    d_old = owl_list_get_element(dl, elt);
     /* Ignore if we're adding the same dispatch again.  Otherwise
        replace the old dispatch. */
@@ -145,5 +145,5 @@
     /* Defer the removal until dispatch is done walking the list */
     dl = owl_global_get_dispatchlist(&g);
-    d = (owl_dispatch*)owl_list_get_element(dl, elt);
+    d = owl_list_get_element(dl, elt);
     d->needs_gc = 1;
   } else {
@@ -163,5 +163,5 @@
   elt = owl_select_find_dispatch(fd);
   if (elt != -1) {
-    d = (owl_dispatch*)owl_list_get_element(owl_global_get_dispatchlist(&g), elt);
+    d = owl_list_get_element(owl_global_get_dispatchlist(&g), elt);
     if (d->cfunc != owl_perlconfig_dispatch) {
       /* don't mess with non-perl dispatch functions from here. */
@@ -186,5 +186,5 @@
   elt = owl_select_find_dispatch(fd);
   if (elt != -1) {
-    d = (owl_dispatch*)owl_list_get_element(owl_global_get_dispatchlist(&g), elt);
+    d = owl_list_get_element(owl_global_get_dispatchlist(&g), elt);
     if (d->cfunc == owl_perlconfig_dispatch) {
       owl_select_remove_dispatch_at(elt);
@@ -207,5 +207,5 @@
   len = owl_select_dispatch_count(g);
   for(i = 0; i < len; i++) {
-    d = (owl_dispatch*)owl_list_get_element(dl, i);
+    d = owl_list_get_element(dl, i);
     FD_SET(d->fd, r);
     FD_SET(d->fd, e);
@@ -245,5 +245,5 @@
 
   for(i = 0; i < len; i++) {
-    d = (owl_dispatch*)owl_list_get_element(dl, i);
+    d = owl_list_get_element(dl, i);
     /* While d shouldn't normally be null, the list may be altered by
      * functions we dispatch to. */
Index: util.c
===================================================================
--- util.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ util.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -139,12 +139,12 @@
     if (first) {
       first=0;
-      foo=(char *)strtok(workbuff, sep);
+      foo=strtok(workbuff, sep);
     } else {
-      foo=(char *)strtok(NULL, sep);
+      foo=strtok(NULL, sep);
     }
     if (foo==NULL) {
       done=1;
     } else {
-      args=(char **)owl_realloc(args, sizeof(char *) * (count+1));
+      args=owl_realloc(args, sizeof(char *) * (count+1));
       args[count]=owl_malloc(strlen(foo)+1);
       strcpy(args[count], foo);
Index: variable.c
===================================================================
--- variable.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ variable.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -521,5 +521,5 @@
       return(-2);
     }
-    owl_dict_insert_element(vd, cur->name, (void*)cur, NULL);
+    owl_dict_insert_element(vd, cur->name, cur, NULL);
   }
   return 0;
@@ -528,9 +528,9 @@
 void owl_variable_dict_add_variable(owl_vardict * vardict,
                                     owl_variable * var) {
-  owl_dict_insert_element(vardict, var->name, (void*)var, (void(*)(void*))owl_variable_free);
+  owl_dict_insert_element(vardict, var->name, var, (void(*)(void*))owl_variable_free);
 }
 
 owl_variable * owl_variable_newvar(char *name, char *summary, char * description) {
-  owl_variable * var = (owl_variable*)owl_malloc(sizeof(owl_variable));
+  owl_variable * var = owl_malloc(sizeof(owl_variable));
   memset(var, 0, sizeof(owl_variable));
   var->name = owl_strdup(name);
@@ -739,15 +739,15 @@
 /* returns a reference */
 char *owl_variable_get_string(owl_vardict *d, char *name) {
-  return (char*)owl_variable_get(d,name, OWL_VARIABLE_STRING);
+  return owl_variable_get(d,name, OWL_VARIABLE_STRING);
 }
 
 /* returns a reference */
 void *owl_variable_get_other(owl_vardict *d, char *name) {
-  return (char*)owl_variable_get(d,name, OWL_VARIABLE_OTHER);
+  return owl_variable_get(d,name, OWL_VARIABLE_OTHER);
 }
 
 int owl_variable_get_int(owl_vardict *d, char *name) {
   int *pi;
-  pi = (int*)owl_variable_get(d,name,OWL_VARIABLE_INT);
+  pi = owl_variable_get(d,name,OWL_VARIABLE_INT);
   if (!pi) return(-1);
   return(*pi);
@@ -756,5 +756,5 @@
 int owl_variable_get_bool(owl_vardict *d, char *name) {
   int *pi;
-  pi = (int*)owl_variable_get(d,name,OWL_VARIABLE_BOOL);
+  pi = owl_variable_get(d,name,OWL_VARIABLE_BOOL);
   if (!pi) return(-1);
   return(*pi);
Index: view.c
===================================================================
--- view.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ view.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -38,5 +38,5 @@
 
   /* nuke the old list */
-  owl_list_free_simple((owl_list *) ml);
+  owl_list_free_simple(&ml->list);
   owl_messagelist_create(&(v->ml));
 
@@ -161,5 +161,5 @@
 void owl_view_free(owl_view *v)
 {
-  owl_list_free_simple((owl_list *) &(v->ml));
+  owl_list_free_simple(&v->ml.list);
   if (v->name) owl_free(v->name);
 }
Index: zcrypt.c
===================================================================
--- zcrypt.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ zcrypt.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -249,5 +249,5 @@
       /* Prepare result to be returned */
       char *temp = keyfile;
-      keyfile = (char *)owl_malloc(strlen(temp) + 1);
+      keyfile = owl_malloc(strlen(temp) + 1);
       if (keyfile) {
 	strcpy(keyfile, temp);
Index: zephyr.c
===================================================================
--- zephyr.c	(revision d43edd2156ec9694ba4cec1c13baba690ce46b19)
+++ zephyr.c	(revision 4d86e066c8f1fe00bd18a85523b809ba4c968947)
@@ -42,5 +42,5 @@
   }
 
-  (void) memset((char *)&sin, 0, sizeof(struct sockaddr_in));
+  (void) memset(&sin, 0, sizeof(struct sockaddr_in));
 
   sp = getservbyname(HM_SVCNAME, "udp");
@@ -51,5 +51,5 @@
   sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
 
-  (void) memset((char *)&req, 0, sizeof(req));
+  (void) memset(&req, 0, sizeof(req));
   req.z_kind = STAT;
   req.z_port = 0;
@@ -278,9 +278,9 @@
     
     /* add it to the list of subs */
-    if ((tmp=(char *) strtok(start, ",\n\r"))==NULL) continue;
+    if ((tmp=strtok(start, ",\n\r"))==NULL) continue;
     subs[count].zsub_class=owl_strdup(tmp);
-    if ((tmp=(char *) strtok(NULL, ",\n\r"))==NULL) continue;
+    if ((tmp=strtok(NULL, ",\n\r"))==NULL) continue;
     subs[count].zsub_classinst=owl_strdup(tmp);
-    if ((tmp=(char *) strtok(NULL, " \t\n\r"))==NULL) continue;
+    if ((tmp=strtok(NULL, " \t\n\r"))==NULL) continue;
     subs[count].zsub_recipient=owl_strdup(tmp);
     
