Changeset 34509d5 for functions.c


Ignore:
Timestamp:
Dec 23, 2007, 7:48:01 PM (17 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
93ee554
Parents:
9a6cc40
Message:
GLib/Unicode branch - adding glib dependency.

Linking BarnOwl to GLib. 

Cleaning up some malloc/realloc/strdup/free code, moving to owl_*
functions for each.

Changing to GLib memory allocation functions.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r48609ce r34509d5  
    30253025
    30263026  /* first, create the filter */
    3027   f=malloc(sizeof(owl_filter));
    3028   buff=malloc(strlen(class)+strlen(inst)+strlen(recip)+100);
     3027  f=owl_malloc(sizeof(owl_filter));
     3028  buff=owl_malloc(strlen(class)+strlen(inst)+strlen(recip)+100);
    30293029  strcpy(buff, "class");
    30303030  if (!strcmp(class, "*")) {
     
    33143314          if (ret==0) {
    33153315            for (x=0; x<numlocs; x++) {
    3316               line=malloc(strlen(location[x].host)+strlen(location[x].time)+strlen(location[x].tty)+100);
     3316              line=owl_malloc(strlen(location[x].host)+strlen(location[x].time)+strlen(location[x].tty)+100);
    33173317              tmp=short_zuser(user);
    33183318              sprintf(line, "  %-10.10s %-24.24s %-12.12s  %20.20s\n",
     
    34203420          _exit(127);
    34213421        }
    3422         parsed=realloc(parsed, sizeof(*parsed) * (myargc+1));
     3422        parsed=owl_realloc(parsed, sizeof(*parsed) * (myargc+1));
    34233423        parsed[myargc] = NULL;
    34243424       
Note: See TracChangeset for help on using the changeset viewer.