Changeset 7f880ee8 in mainline


Ignore:
Timestamp:
2008-06-03T19:22:59Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fadfaf8
Parents:
78d0da8
Message:

Return value argument to ipc_call_sync_X_Y() may not be int or it will
break on 64-machines that are sensitive to unaligned memory accesses.
Moreover, overcasting int * to sysarg_t * is not a good idea either
even if the int is by chance aligned on a 64-bit boundary as some
unknown memory will get overwritten during the assignment. Change the
type of the retval argument to ipcarg_t.

File:
1 edited

Legend:

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

    r78d0da8 r7f880ee8  
    273273               
    274274                if (*bufpos == *buflen) {
    275                         int retval;
    276                         int rc = ipc_call_sync_2_1(phone, RD_READ_BLOCK, *pos / BLOCK_SIZE, BLOCK_SIZE, (sysarg_t *) &retval);
     275                        ipcarg_t retval;
     276                        int rc = ipc_call_sync_2_1(phone, RD_READ_BLOCK,
     277                            *pos / BLOCK_SIZE, BLOCK_SIZE,
     278                            &retval);
    277279                        if ((rc != EOK) || (retval != EOK))
    278280                                return false;
Note: See TracChangeset for help on using the changeset viewer.