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

    r9518a85 r96828e4  
    234234  owl_message *m;
    235235
    236   m=owl_malloc(sizeof(owl_message));
     236  m=g_new(owl_message, 1);
    237237  owl_message_create_admin(m, header, body);
    238238 
     
    257257
    258258  /* create the message */
    259   m=owl_malloc(sizeof(owl_message));
     259  m=g_new(owl_message, 1);
    260260  owl_message_create_from_zwrite(m, z, owl_zwrite_get_message(z));
    261261
     
    275275  if (!owl_global_is_aimloggedin(&g)) return(NULL);
    276276 
    277   m=owl_malloc(sizeof(owl_message));
     277  m=g_new(owl_message, 1);
    278278  owl_message_create_aim(m,
    279279                         owl_global_get_aim_screenname(&g),
     
    294294
    295295  /* create the message */
    296   m=owl_malloc(sizeof(owl_message));
     296  m=g_new(owl_message, 1);
    297297  owl_message_create_loopback(m, body);
    298298  owl_message_set_direction_out(m);
     
    553553  /* create a message and put it on the message queue.  This simulates
    554554   * an incoming message */
    555   min=owl_malloc(sizeof(owl_message));
     555  min=g_new(owl_message, 1);
    556556  mout=owl_function_make_outgoing_loopback(msg);
    557557
     
    34573457  for (i = 0; i < j; i++) {
    34583458    user = owl_list_get_element(&anyone, i);
    3459     zald = owl_malloc(sizeof(ZAsyncLocateData_t));
     3459    zald = g_new(ZAsyncLocateData_t, 1);
    34603460    if (ZRequestLocations(zstr(user), zald, UNACKED, ZAUTH) == ZERR_NONE) {
    34613461      *zaldlist = g_list_append(*zaldlist, zald);
Note: See TracChangeset for help on using the changeset viewer.