Changeset feeac0d in mainline for uspace/srv/fs/cdfs/cdfs_ops.c


Ignore:
Timestamp:
2013-09-10T16:32:35Z (11 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4982d87
Parents:
e8d6ce2
Message:

Simplify use of list_foreach.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/cdfs/cdfs_ops.c

    re8d6ce2 rfeeac0d  
    365365       
    366366        /* Check for duplicate entries */
    367         list_foreach(parent->cs_list, link) {
    368                 cdfs_dentry_t *dentry =
    369                     list_get_instance(link, cdfs_dentry_t, link);
    370                
     367        list_foreach(parent->cs_list, link, cdfs_dentry_t, dentry) {
    371368                if (str_cmp(dentry->name, name) == 0)
    372369                        return EEXIST;
     
    524521        }
    525522       
    526         list_foreach(parent->cs_list, link) {
    527                 cdfs_dentry_t *dentry =
    528                     list_get_instance(link, cdfs_dentry_t, link);
    529                
     523        list_foreach(parent->cs_list, link, cdfs_dentry_t, dentry) {
    530524                if (str_cmp(dentry->name, component) == 0) {
    531525                        *fn = get_cached_node(parent->service_id, dentry->index);
Note: See TracChangeset for help on using the changeset viewer.