Changeset 36486be for keymap.c


Ignore:
Timestamp:
Aug 22, 2009, 12:50:08 AM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, 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
  • keymap.c

    r12bc46a r36486be  
    5656char *owl_keymap_summary(const owl_keymap *km)
    5757{
    58   char *s;
    59   int slen;
    6058  if (!km || !km->name || !km->desc) return NULL;
    61   slen = strlen(km->name)+strlen(km->desc)+20;
    62   s = owl_malloc(slen);
    63   snprintf(s, slen-1, "%-15s - %s", km->name, km->desc);
    64   return s;
     59  return owl_sprintf("%-15s - %s", km->name, km->desc);
    6560}
    6661
Note: See TracChangeset for help on using the changeset viewer.