Changeset 96828e4 for keymap.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
  • keymap.c

    r44cc9ab r96828e4  
    3838  int i;
    3939
    40   if ((kb = owl_malloc(sizeof(owl_keybinding))) == NULL) return(-1);
     40  if ((kb = g_new(owl_keybinding, 1)) == NULL) return(-1);
    4141  if (0 != owl_keybinding_init(kb, keyseq, command, function_fn, desc)) {
    4242    owl_free(kb);
     
    6363  int i;
    6464
    65   if ((kb = owl_malloc(sizeof(owl_keybinding))) == NULL) return(-1);
     65  if ((kb = g_new(owl_keybinding, 1)) == NULL) return(-1);
    6666  if (0 != owl_keybinding_make_keys(kb, keyseq)) {
    6767    owl_free(kb);
     
    197197{
    198198  owl_keymap *km;
    199   km = owl_malloc(sizeof(owl_keymap));
     199  km = g_new(owl_keymap, 1);
    200200  if (!km) return NULL;
    201201  owl_keymap_init(km, name, desc, default_fn, prealways_fn, postalways_fn);
Note: See TracChangeset for help on using the changeset viewer.