Changeset a42d7d8 in mainline for uspace/lib/bithenge/expression.c


Ignore:
Timestamp:
2012-08-19T05:28:24Z (12 years ago)
Author:
Sean Bartell <wingedtachikoma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fae4d30
Parents:
1c79996
Message:

Bithenge: add fake system call errors to test error handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/bithenge/expression.c

    r1c79996 ra42d7d8  
    104104        /* Check types and get values. */
    105105        bithenge_int_t a_int = 0, b_int = 0;
    106         bool a_bool = false, b_bool = false;
     106        bool a_bool = false, b_bool = false, out_bool = false;
    107107        switch (self->op) {
    108108        case BITHENGE_EXPRESSION_ADD: /* fallthrough */
     
    187187                break;
    188188        case BITHENGE_EXPRESSION_EQUALS:
    189                 rc = bithenge_new_boolean_node(out, bithenge_node_equal(a, b));
     189                rc = bithenge_node_equal(&out_bool, a, b);
     190                if (rc != EOK)
     191                        break;
     192                rc = bithenge_new_boolean_node(out, out_bool);
    190193                break;
    191194        case BITHENGE_EXPRESSION_NOT_EQUALS:
    192                 rc = bithenge_new_boolean_node(out,
    193                     !bithenge_node_equal(a, b));
     195                rc = bithenge_node_equal(&out_bool, a, b);
     196                if (rc != EOK)
     197                        break;
     198                rc = bithenge_new_boolean_node(out, !out_bool);
    194199                break;
    195200        case BITHENGE_EXPRESSION_AND:
Note: See TracChangeset for help on using the changeset viewer.