Changeset 9c4cf0d in mainline for uspace/app/viewer/viewer.c


Ignore:
Timestamp:
2017-04-02T11:24:06Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
151f1cc
Parents:
b19e892
Message:

Rename close() to vfs_put()

This is motivated mainly by the fact that a file handle does not
necessarily correspond to an open file and close() was no longer the
the opposite operation to open().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/viewer/viewer.c

    rb19e892 r9c4cf0d  
    116116        int rc = vfs_stat(fd, &stat);
    117117        if (rc != EOK) {
    118                 close(fd);
     118                vfs_put(fd);
    119119                return false;
    120120        }
     
    122122        void *tga = malloc(stat.size);
    123123        if (tga == NULL) {
    124                 close(fd);
     124                vfs_put(fd);
    125125                return false;
    126126        }
     
    129129        if ((rd < 0) || (rd != (ssize_t) stat.size)) {
    130130                free(tga);
    131                 close(fd);
    132                 return false;
    133         }
    134        
    135         close(fd);
     131                vfs_put(fd);
     132                return false;
     133        }
     134       
     135        vfs_put(fd);
    136136       
    137137        *p_local_surface = decode_tga(tga, stat.size, 0);
Note: See TracChangeset for help on using the changeset viewer.