Changeset 92fc397


Ignore:
Timestamp:
May 12, 2011, 4:39:27 PM (14 years ago)
Author:
David Benjamin <davidben@mit.edu>
Children:
c6c51d2
Parents:
c72f884
git-author:
David Benjamin <davidben@mit.edu> (05/07/11 15:23:49)
git-committer:
David Benjamin <davidben@mit.edu> (05/12/11 16:39:27)
Message:
owl_dict_create also never fails

And like everywhere else, we weren't checking the return values most of
the time anyway.
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cmd.c

    r55b2de8 r92fc397  
    1212
    1313int owl_cmddict_setup(owl_cmddict *cd) {
    14   if (0 != owl_cmddict_init(cd)) return(-1);
     14  owl_cmddict_init(cd);
    1515  if (0 != owl_cmddict_add_from_list(cd, commands_to_init)) return(-1);
    1616  return(0);
    1717}
    1818
    19 int owl_cmddict_init(owl_cmddict *cd) {
    20   if (owl_dict_create(cd)) return(-1);
    21   return(0);
     19void owl_cmddict_init(owl_cmddict *cd) {
     20  owl_dict_create(cd);
    2221}
    2322
  • dict.c

    rc72f884 r92fc397  
    1515#define GROWBY 3 / 2
    1616
    17 int owl_dict_create(owl_dict *d) {
     17void owl_dict_create(owl_dict *d) {
    1818  d->size=0;
    1919  d->els=g_new(owl_dict_el, INITSIZE);
    2020  d->avail=INITSIZE;
    21   if (d->els==NULL) return(-1);
    22   return(0);
    2321}
    2422
  • keymap.c

    r7fd0bf7 r92fc397  
    179179/* NOTE: keyhandler has private access to the internals of keymap */
    180180
    181 int owl_keyhandler_init(owl_keyhandler *kh)
    182 {
    183   if (0 != owl_dict_create(&kh->keymaps)) return(-1);
     181void owl_keyhandler_init(owl_keyhandler *kh)
     182{
     183  owl_dict_create(&kh->keymaps);
    184184  kh->active = NULL;
    185185  owl_keyhandler_reset(kh);
    186   return(0);
    187186}
    188187
  • tester.c

    rc72f884 r92fc397  
    233233
    234234  printf("# BEGIN testing owl_dict\n");
    235   FAIL_UNLESS("create", 0==owl_dict_create(&d));
     235  owl_dict_create(&d);
    236236  FAIL_UNLESS("insert b", 0==owl_dict_insert_element(&d, "b", bv, owl_dict_noop_delete));
    237237  FAIL_UNLESS("insert d", 0==owl_dict_insert_element(&d, "d", dv, owl_dict_noop_delete));
  • variable.c

    r55b2de8 r92fc397  
    559559int owl_variable_dict_setup(owl_vardict *vd) {
    560560  owl_variable *var, *cur;
    561   if (owl_dict_create(vd)) return(-1);
     561  owl_dict_create(vd);
    562562  for (var = variables_to_init; var->name != NULL; var++) {
    563563    cur = g_new(owl_variable, 1);
Note: See TracChangeset for help on using the changeset viewer.