Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset fa603e99 in mainline


Ignore:
Timestamp:
2019-07-08T12:20:34Z (16 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
a949f4a
Parents:
b781cc49
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-07-08 12:19:14)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-07-08 12:20:34)
Message:

Fix unhandled error condition in udebug_name_read

Detected by GCC when LTO is enabled.
Also changed a bunch of literal zeros in the file to EOK.

Location:
kernel/generic/src/udebug
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/udebug/udebug_ipc.c

    rb781cc49 rfa603e99  
    5959        }
    6060
    61         return 0;
     61        return EOK;
    6262}
    6363
     
    191191         */
    192192
    193         ipc_set_retval(&call->data, 0);
     193        ipc_set_retval(&call->data, EOK);
    194194        /*
    195195         * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
     
    218218        size_t buf_size;
    219219        void *data;
     220        errno_t rc;
    220221
    221222        uspace_addr = ipc_get_arg2(&call->data);        /* Destination address */
     
    225226         * Read task name.
    226227         */
    227         udebug_name_read((char **) &data, &data_size);
     228        rc = udebug_name_read((char **) &data, &data_size);
     229        if (rc != EOK) {
     230                ipc_set_retval(&call->data, rc);
     231                ipc_answer(&TASK->kb.box, call);
     232                return;
     233        }
    228234
    229235        /* Copy MAX(buf_size, data_size) bytes */
     
    238244         */
    239245
    240         ipc_set_retval(&call->data, 0);
     246        ipc_set_retval(&call->data, EOK);
    241247        /*
    242248         * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
     
    292298         */
    293299
    294         ipc_set_retval(&call->data, 0);
     300        ipc_set_retval(&call->data, EOK);
    295301        /*
    296302         * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
     
    334340        uspace_addr = ipc_get_arg3(&call->data);
    335341
    336         ipc_set_retval(&call->data, 0);
     342        ipc_set_retval(&call->data, EOK);
    337343        /*
    338344         * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
     
    377383        to_copy = sizeof(istate_t);
    378384
    379         ipc_set_retval(&call->data, 0);
     385        ipc_set_retval(&call->data, EOK);
    380386        /*
    381387         * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
     
    417423        assert(buffer != NULL);
    418424
    419         ipc_set_retval(&call->data, 0);
     425        ipc_set_retval(&call->data, EOK);
    420426        /*
    421427         * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
  • kernel/generic/src/udebug/udebug_ops.c

    rb781cc49 rfa603e99  
    427427 * @param data_size Place to store size of the data.
    428428 *
    429  * @return EOK.
     429 * @return EOK on success, ENOMEM if memory allocation failed.
    430430 *
    431431 */
Note: See TracChangeset for help on using the changeset viewer.