Changeset 4d86e06 for cmd.c


Ignore:
Timestamp:
Jul 23, 2009, 12:53:57 AM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
ba6c8bd
Parents:
029a8b5
Message:
Get rid of a whole bunch of useless casts.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cmd.c

    rd43edd2 r4d86e06  
    3939
    4040owl_cmd *owl_cmddict_find(owl_cmddict *d, char *name) {
    41   return (owl_cmd*)owl_dict_find_element(d, name);
     41  return owl_dict_find_element(d, name);
    4242}
    4343
     
    5151  cmd = owl_malloc(sizeof(owl_cmd));
    5252  owl_cmd_create_alias(cmd, alias_from, alias_to);
    53   owl_dict_insert_element(cd, cmd->name, (void*)cmd, (void(*)(void*))owl_cmd_free);   
     53  owl_dict_insert_element(cd, cmd->name, cmd, (void(*)(void*))owl_cmd_free);   
    5454  return(0);
    5555}
     
    6262  }
    6363  owl_perlconfig_new_command(cmd->name);
    64   return owl_dict_insert_element(cd, newcmd->name, (void*)newcmd, (void(*)(void*))owl_cmd_free);
     64  return owl_dict_insert_element(cd, newcmd->name, newcmd, (void(*)(void*))owl_cmd_free);
    6565}
    6666
     
    7070
    7171  if (!strcmp(argv[0], "")) {
    72   } else if (NULL != (cmd = (owl_cmd*)owl_dict_find_element(cd, argv[0]))) {
     72  } else if (NULL != (cmd = owl_dict_find_element(cd, argv[0]))) {
    7373    retval = owl_cmd_execute(cmd, cd, ctx, argc, argv, buff);
    7474  } else {
Note: See TracChangeset for help on using the changeset viewer.