Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/socket/socket_messages.h

    r3db8889 r6092b56e  
    115115 *  @param[out] answer The message answer structure.
    116116 */
    117 #define SOCKET_SET_SOCKET_ID(answer, value) \
    118         {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(answer, argument);}
     117#define SOCKET_SET_SOCKET_ID(answer)            &IPC_GET_ARG1(answer)
    119118
    120119/** Returns the socket identifier message parameter.
    121120 *  @param[in] call The message call structure.
    122121 */
    123 #define SOCKET_GET_SOCKET_ID(call) \
    124         ({int socket_id = (int) IPC_GET_ARG1(call); socket_id;})
     122#define SOCKET_GET_SOCKET_ID(call)              (int) IPC_GET_ARG1(call)
    125123
    126124/** Sets the read data length in the message answer.
    127125 *  @param[out] answer The message answer structure.
    128126 */
    129 #define SOCKET_SET_READ_DATA_LENGTH(answer, value) \
    130         {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(answer, argument);}
     127#define SOCKET_SET_READ_DATA_LENGTH(answer)     &IPC_GET_ARG1(answer)
    131128
    132129/** Returns the read data length message parameter.
    133130 *  @param[in] call The message call structure.
    134131 */
    135 #define SOCKET_GET_READ_DATA_LENGTH(call) \
    136         ({int data_length = (int) IPC_GET_ARG1(call); data_length;})
     132#define SOCKET_GET_READ_DATA_LENGTH(call)       (int) IPC_GET_ARG1(call)
    137133
    138134/** Returns the backlog message parameter.
    139135 *  @param[in] call The message call structure.
    140136 */
    141 #define SOCKET_GET_BACKLOG(call) \
    142         ({int backlog = (int) IPC_GET_ARG2(call); backlog;})
     137#define SOCKET_GET_BACKLOG(call)                (int) IPC_GET_ARG2(call)
    143138
    144139/** Returns the option level message parameter.
    145140 *  @param[in] call The message call structure.
    146141 */
    147 #define SOCKET_GET_OPT_LEVEL(call) \
    148         ({int opt_level = (int) IPC_GET_ARG2(call); opt_level;})
     142#define SOCKET_GET_OPT_LEVEL(call)              (int) IPC_GET_ARG2(call)
    149143
    150144/** Returns the data fragment size message parameter.
    151145 *  @param[in] call The message call structure.
    152146 */
    153 #define SOCKET_GET_DATA_FRAGMENT_SIZE(call) \
    154         ({size_t size = (size_t) IPC_GET_ARG2(call); size;})
     147#define SOCKET_GET_DATA_FRAGMENT_SIZE(call)     (size_t) IPC_GET_ARG2(call)
    155148
    156149/** Sets the data fragment size in the message answer.
    157150 *  @param[out] answer The message answer structure.
    158151 */
    159 #define SOCKET_SET_DATA_FRAGMENT_SIZE(answer, value) \
    160         {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG2(answer, argument);}
     152#define SOCKET_SET_DATA_FRAGMENT_SIZE(answer)   &IPC_GET_ARG2(answer)
    161153
    162154/** Sets the address length in the message answer.
    163155 *  @param[out] answer The message answer structure.
    164156 */
    165 #define SOCKET_SET_ADDRESS_LENGTH(answer, value) \
    166         {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG3(answer, argument);}
     157#define SOCKET_SET_ADDRESS_LENGTH(answer)       &IPC_GET_ARG3(answer)
    167158
    168159/** Returns the address length message parameter.
    169160 *  @param[in] call The message call structure.
    170161 */
    171 #define SOCKET_GET_ADDRESS_LENGTH(call) \
    172         ({socklen_t address_length = (socklen_t) IPC_GET_ARG3(call); address_length;})
     162#define SOCKET_GET_ADDRESS_LENGTH(call)         (socklen_t) IPC_GET_ARG3(call)
    173163
    174164/** Sets the header size in the message answer.
    175165 *  @param[out] answer The message answer structure.
    176166 */
    177 #define SOCKET_SET_HEADER_SIZE(answer, value) \
    178         \
    179         {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG3(answer, argument);}
     167#define SOCKET_SET_HEADER_SIZE(answer)          &IPC_GET_ARG3(answer)
    180168
    181169/** Returns the header size message parameter.
    182170 *  @param[in] call The message call structure.
    183171 */
    184 #define SOCKET_GET_HEADER_SIZE(call) \
    185         ({size_t size = (size_t) IPC_GET_ARG3(call); size;})
     172#define SOCKET_GET_HEADER_SIZE(call)            (size_t) IPC_GET_ARG3(call)
    186173
    187174/** Returns the flags message parameter.
    188175 *  @param[in] call The message call structure.
    189176 */
    190 #define SOCKET_GET_FLAGS(call) \
    191         ({int flags = (int) IPC_GET_ARG4(call); flags;})
     177#define SOCKET_GET_FLAGS(call)                  (int) IPC_GET_ARG4(call)
    192178
    193179/** Returns the option name message parameter.
    194180 *  @param[in] call The message call structure.
    195181 */
    196 #define SOCKET_GET_OPT_NAME(call) \
    197         ({int opt_name = (int) IPC_GET_ARG4(call); opt_name;})
     182#define SOCKET_GET_OPT_NAME(call)               (int) IPC_GET_ARG4(call)
    198183
    199184/** Returns the data fragments message parameter.
    200185 *  @param[in] call The message call structure.
    201186 */
    202 #define SOCKET_GET_DATA_FRAGMENTS(call) \
    203         ({int fragments = (int) IPC_GET_ARG5(call); fragments;})
     187#define SOCKET_GET_DATA_FRAGMENTS(call)         (int) IPC_GET_ARG5(call)
    204188
    205189/** Returns the new socket identifier message parameter.
    206190 *  @param[in] call The message call structure.
    207191 */
    208 #define SOCKET_GET_NEW_SOCKET_ID(call) \
    209         ({int socket_id = (int) IPC_GET_ARG5(call); socket_id;})
     192#define SOCKET_GET_NEW_SOCKET_ID(call)          (int) IPC_GET_ARG5(call)
    210193
    211194/*@}*/
Note: See TracChangeset for help on using the changeset viewer.