Changeset 4c7c21f


Ignore:
Timestamp:
May 20, 2011, 3:59:31 PM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
f97c1a6
Parents:
351c535
git-author:
David Benjamin <davidben@mit.edu> (05/07/11 15:23:49)
git-committer:
David Benjamin <davidben@mit.edu> (05/20/11 15:59:31)
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

    r3b8a563 r4c7c21f  
    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

    r351c535 r4c7c21f  
    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

    rfda61d3 r4c7c21f  
    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

    r351c535 r4c7c21f  
    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

    r3b8a563 r4c7c21f  
    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.