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

    rcedbe9d r96828e4  
    1414owl_viewwin *owl_viewwin_new_text(owl_window *win, const char *text)
    1515{
    16   owl_viewwin *v = owl_malloc(sizeof(owl_viewwin));
    17   memset(v, 0, sizeof(*v));
     16  owl_viewwin *v = g_new0(owl_viewwin, 1);
    1817  owl_fmtext_init_null(&(v->fmtext));
    1918  if (text) {
     
    3837{
    3938  char *text;
    40   owl_viewwin *v = owl_malloc(sizeof(owl_viewwin));
    41   memset(v, 0, sizeof(*v));
     39  owl_viewwin *v = g_new0(owl_viewwin, 1);
    4240
    4341  owl_fmtext_copy(&(v->fmtext), fmtext);
     
    197195  owl_editwin_insert_string(tw, buffstart);
    198196
    199   data = owl_malloc(sizeof(owl_viewwin_search_data));
     197  data = g_new(owl_viewwin_search_data, 1);
    200198  data->v = v;
    201199  data->direction = direction;
Note: See TracChangeset for help on using the changeset viewer.