Changeset c9f6e49f in mainline


Ignore:
Timestamp:
2008-04-13T02:53:09Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
06901c6b
Parents:
9ad75d5
Message:

Reset the component length variable only prior collecting a new component.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libfs/libfs.c

    r9ad75d5 rc9f6e49f  
    143143        int lflag = IPC_GET_ARG4(*request);
    144144        fs_index_t index = IPC_GET_ARG5(*request); /* when L_LINK specified */
     145        char component[NAME_MAX + 1];
     146        int len;
    145147
    146148        if (last < next)
     
    153155                next++;         /* eat slash */
    154156       
    155         char component[NAME_MAX + 1];
    156         int len = 0;
    157157        while (ops->has_children(cur) && next <= last) {
    158158                void *tmp;
    159159
    160160                /* collect the component */
     161                len = 0;
    161162                while ((ops->plb_get_char(next) != '/') && (next <= last)) {
    162163                        if (len + 1 == NAME_MAX) {
     
    172173                component[len] = '\0';
    173174                next++;         /* eat slash */
    174                 len = 0;
    175175
    176176                /* match the component */
     
    237237
    238238                        /* collect next component */
     239                        len = 0;
    239240                        while (next <= last) {
    240241                                if (ops->plb_get_char(next) == '/') {
     
    253254                        assert(len);
    254255                        component[len] = '\0';
    255                         len = 0;
    256256                               
    257257                        void *nodep;
Note: See TracChangeset for help on using the changeset viewer.