Changeset 96828e4 for cmd.c


Ignore:
Timestamp:
Feb 11, 2011, 4:31:33 PM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
35b6eb9
Parents:
9518a85
git-author:
Anders Kaseorg <andersk@mit.edu> (08/27/09 00:51:45)
git-committer:
Anders Kaseorg <andersk@mit.edu> (02/11/11 16:31:33)
Message:
Replace owl_malloc with g_new and g_new0.

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

Legend:

Unmodified
Added
Removed
  • cmd.c

    r4d24650 r96828e4  
    5050int owl_cmddict_add_alias(owl_cmddict *cd, const char *alias_from, const char *alias_to) {
    5151  owl_cmd *cmd;
    52   cmd = owl_malloc(sizeof(owl_cmd));
     52  cmd = g_new(owl_cmd, 1);
    5353  owl_cmd_create_alias(cmd, alias_from, alias_to);
    5454  owl_perlconfig_new_command(cmd->name);
     
    5858
    5959int owl_cmddict_add_cmd(owl_cmddict *cd, const owl_cmd * cmd) {
    60   owl_cmd * newcmd = owl_malloc(sizeof(owl_cmd));
     60  owl_cmd * newcmd = g_new(owl_cmd, 1);
    6161  if(owl_cmd_create_from_template(newcmd, cmd) < 0) {
    6262    owl_free(newcmd);
Note: See TracChangeset for help on using the changeset viewer.