Changeset 84239b1 in mainline for uspace/lib/bithenge


Ignore:
Timestamp:
2018-03-11T19:39:11Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f3d47c97
Parents:
850fd32
Message:

And there was much fixing.

Location:
uspace/lib/bithenge/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/bithenge/src/compound.c

    r850fd32 r84239b1  
    7070
    7171        /* i ranges from (self->num - 1) to 0 inside the loop. */
    72         for (size_t i = self->num; i--; ) {
     72        size_t i = self->num;
     73        while (i-- != 0) {
    7374                bithenge_node_t *tmp;
    7475                rc = bithenge_transform_apply(self->xforms[i], scope, in,
  • uspace/lib/bithenge/src/print.c

    r850fd32 r84239b1  
    162162        const char *value = bithenge_string_node_value(node);
    163163        state_printf(state, "\"");
    164         for (string_iterator_t i = string_iterator(value); !string_iterator_done(&i); ) {
     164        string_iterator_t i = string_iterator(value);
     165        while (!string_iterator_done(&i)) {
    165166                wchar_t ch;
    166167                errno_t rc = string_iterator_next(&i, &ch);
  • uspace/lib/bithenge/src/sequence.c

    r850fd32 r84239b1  
    607607        self->subtransforms = subtransforms;
    608608        self->num_subtransforms = 0;
    609         for (self->num_subtransforms = 0;
    610             subtransforms[self->num_subtransforms].transform;
    611             self->num_subtransforms++);
     609        while (subtransforms[self->num_subtransforms].transform)
     610            self->num_subtransforms++;
    612611        *out = struct_as_transform(self);
    613612        return EOK;
Note: See TracChangeset for help on using the changeset viewer.