Changeset 92688eb in mainline


Ignore:
Timestamp:
2007-12-30T21:13:37Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
449c246
Parents:
986332aa
Message:

Rename variable from 'size' to 'len'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/tmpfs/tmpfs_ops.c

    r986332aa r92688eb  
    300300         */
    301301        ipc_callid_t callid;
    302         size_t size;
    303         if (!ipc_data_read_receive(&callid, &size)) {
     302        size_t len;
     303        if (!ipc_data_read_receive(&callid, &len)) {
    304304                ipc_answer_0(callid, EINVAL);   
    305305                ipc_answer_0(rid, EINVAL);
     
    307307        }
    308308
    309         size_t bytes = max(0, min(dentry->size - pos, size));
     309        size_t bytes = max(0, min(dentry->size - pos, len));
    310310        (void) ipc_data_read_deliver(callid, dentry->data + pos, bytes);
    311311
     
    338338         */
    339339        ipc_callid_t callid;
    340         size_t size;
    341         if (!ipc_data_write_receive(&callid, NULL, &size)) {
     340        size_t len;
     341        if (!ipc_data_write_receive(&callid, NULL, &len)) {
    342342                ipc_answer_0(callid, EINVAL);   
    343343                ipc_answer_0(rid, EINVAL);
     
    348348         * Check whether the file needs to grow.
    349349         */
    350         if (pos + size <= dentry->size) {
     350        if (pos + len <= dentry->size) {
    351351                /* The file size is not changing. */
    352                 (void) ipc_data_write_deliver(callid, dentry->data + pos, size);
    353                 ipc_answer_1(rid, EOK, size);
    354                 return;
    355         }
    356         size_t delta = (pos + size) - dentry->size;
     352                (void) ipc_data_write_deliver(callid, dentry->data + pos, len);
     353                ipc_answer_1(rid, EOK, len);
     354                return;
     355        }
     356        size_t delta = (pos + len) - dentry->size;
    357357        /*
    358358         * At this point, we are deliberately extremely straightforward and
     
    370370        dentry->size += delta;
    371371        dentry->data = newdata;
    372         (void) ipc_data_write_deliver(callid, dentry->data + pos, size);
    373         ipc_answer_1(rid, EOK, size);
     372        (void) ipc_data_write_deliver(callid, dentry->data + pos, len);
     373        ipc_answer_1(rid, EOK, len);
    374374}
    375375
Note: See TracChangeset for help on using the changeset viewer.