Changeset 36486be for aim.c


Ignore:
Timestamp:
Aug 22, 2009, 12:50:08 AM (15 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
24ccc01
Parents:
303a9e1
git-author:
Anders Kaseorg <andersk@mit.edu> (08/22/09 00:47:21)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/22/09 00:50:08)
Message:
Replace several owl_malloc, sprintf sequences with owl_strdup or owl_sprintf.

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

Legend:

Unmodified
Added
Removed
  • aim.c

    r2646676 r36486be  
    943943 
    944944  if (modname) {
    945     if (!(filename = owl_malloc(strlen(priv->aimbinarypath)+1+strlen(modname)+4+1))) {
    946       /* perror("memrequest: malloc"); */
    947       return -1;
    948     }
    949     sprintf(filename, "%s/%s.ocm", priv->aimbinarypath, modname);
     945    filename = owl_sprintf("%s/%s.ocm", priv->aimbinarypath, modname);
    950946  } else {
    951     if (!(filename = owl_malloc(strlen(priv->aimbinarypath)+1+strlen(defaultmod)+1))) {
    952       /* perror("memrequest: malloc"); */
    953       return -1;
    954     }
    955     sprintf(filename, "%s/%s", priv->aimbinarypath, defaultmod);
     947    filename = owl_sprintf("%s/%s", priv->aimbinarypath, defaultmod);
    956948  }
    957949 
Note: See TracChangeset for help on using the changeset viewer.