Changeset 8ebe212 in mainline


Ignore:
Timestamp:
2018-04-13T12:39:06Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
18b6a88
Parents:
f712a85
git-author:
Jiri Svoboda <jiri@…> (2018-04-12 17:38:04)
git-committer:
Jiri Svoboda <jiri@…> (2018-04-13 12:39:06)
Message:

ccheck-fix a few files with for loops.

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/ofw/ofw_tree.c

    rf712a85 r8ebe212  
    106106         * Try to find the disambigued name.
    107107         */
    108         for (ofw_tree_node_t * cur = node->child; cur; cur = cur->peer) {
     108        for (ofw_tree_node_t *cur = node->child; cur; cur = cur->peer) {
    109109                if (str_cmp(cur->da_name, name) == 0)
    110110                        return cur;
     
    118118         * are not always fully-qualified.
    119119         */
    120         for (ofw_tree_node_t * cur = node->child; cur; cur = cur->peer) {
     120        for (ofw_tree_node_t *cur = node->child; cur; cur = cur->peer) {
    121121                if (str_cmp(ofw_tree_node_name(cur), name) == 0)
    122122                        return cur;
     
    138138    const char *dtype)
    139139{
    140         for (ofw_tree_node_t * cur = node->child; cur; cur = cur->peer) {
     140        for (ofw_tree_node_t *cur = node->child; cur; cur = cur->peer) {
    141141                ofw_tree_property_t *prop =
    142142                    ofw_tree_getprop(cur, "device_type");
     
    167167    phandle handle)
    168168{
    169         for (ofw_tree_node_t * cur = root; cur; cur = cur->peer) {
     169        for (ofw_tree_node_t *cur = root; cur; cur = cur->peer) {
    170170                if (cur->node_handle == handle)
    171171                        return cur;
     
    194194    const char *dtype)
    195195{
    196         for (ofw_tree_node_t * cur = node->peer; cur; cur = cur->peer) {
     196        for (ofw_tree_node_t *cur = node->peer; cur; cur = cur->peer) {
    197197                ofw_tree_property_t *prop =
    198198                    ofw_tree_getprop(cur, "device_type");
     
    220220    const char *name)
    221221{
    222         for (ofw_tree_node_t * cur = node->peer; cur; cur = cur->peer) {
     222        for (ofw_tree_node_t *cur = node->peer; cur; cur = cur->peer) {
    223223                ofw_tree_property_t *prop =
    224224                    ofw_tree_getprop(cur, "name");
     
    284284    const char *dtype, ofw_tree_walker_t walker, void *arg)
    285285{
    286         for (ofw_tree_node_t * cur = node; cur; cur = cur->peer) {
     286        for (ofw_tree_node_t *cur = node; cur; cur = cur->peer) {
    287287                ofw_tree_property_t *prop =
    288288                    ofw_tree_getprop(cur, "device_type");
     
    388388        char *cur_path = (char *) malloc(PATH_MAX_LEN, 0);
    389389
    390         for (ofw_tree_node_t * cur = node; cur; cur = cur->peer) {
     390        for (ofw_tree_node_t *cur = node; cur; cur = cur->peer) {
    391391                if ((cur->parent) && (path))
    392392                        snprintf(cur_path, PATH_MAX_LEN, "%s.%s", path, cur->da_name);
  • kernel/generic/src/smp/smp_call.c

    rf712a85 r8ebe212  
    222222
    223223        /* Walk the list manually, so that we can safely remove list items. */
    224         for (link_t * cur = calls_list.head.next, *next = cur->next;
     224        for (link_t *cur = calls_list.head.next, *next = cur->next;
    225225            !list_empty(&calls_list); cur = next, next = cur->next) {
    226226
  • kernel/generic/src/sysinfo/sysinfo.c

    rf712a85 r8ebe212  
    511511                        break;
    512512                case SYSINFO_VAL_VAL:
    513                         printf(" -> %" PRIun" (%#" PRIxn ")\n", cur->val.val,
     513                        printf(" -> %" PRIun " (%#" PRIxn ")\n", cur->val.val,
    514514                            cur->val.val);
    515515                        break;
     
    519519                case SYSINFO_VAL_FUNCTION_VAL:
    520520                        val = cur->val.gen_val.fn(cur, cur->val.gen_val.data);
    521                         printf(" -> %" PRIun" (%#" PRIxn ") [generated]\n", val,
     521                        printf(" -> %" PRIun " (%#" PRIxn ") [generated]\n", val,
    522522                            val);
    523523                        break;
  • uspace/app/tester/mm/common.c

    rf712a85 r8ebe212  
    269269void fill_block(mem_block_t *block)
    270270{
    271         for (uint8_t * pos = block->addr, *end = pos + block->size;
     271        for (uint8_t *pos = block->addr, *end = pos + block->size;
    272272            pos < end; pos++)
    273273                *pos = block_expected_value(block, pos);
     
    286286void check_block(mem_block_t *block)
    287287{
    288         for (uint8_t * pos = block->addr, *end = pos + block->size;
     288        for (uint8_t *pos = block->addr, *end = pos + block->size;
    289289            pos < end; pos++) {
    290290                if (*pos != block_expected_value(block, pos)) {
     
    402402void fill_area(mem_area_t *area)
    403403{
    404         for (uint8_t * pos = area->addr, *end = pos + area->size;
     404        for (uint8_t *pos = area->addr, *end = pos + area->size;
    405405            pos < end; pos++)
    406406                *pos = area_expected_value(area, pos);
  • uspace/app/vuhid/main.c

    rf712a85 r8ebe212  
    172172{
    173173        printf("Available devices:\n");
    174         for (vuhid_interface_t * *i = available_hid_interfaces; *i != NULL; ++i) {
     174        for (vuhid_interface_t **i = available_hid_interfaces; *i != NULL; ++i) {
    175175                printf("\t`%s'\t%s\n", (*i)->id, (*i)->name);
    176176        }
  • uspace/drv/bus/usb/xhci/hc.c

    rf712a85 r8ebe212  
    8787        xhci_port_speed_t *speeds = hc->speeds;
    8888
    89         for (xhci_extcap_t * ec = hc->xecp; ec; ec = xhci_extcap_next(ec)) {
     89        for (xhci_extcap_t *ec = hc->xecp; ec; ec = xhci_extcap_next(ec)) {
    9090                xhci_dump_extcap(ec);
    9191                switch (XHCI_REG_RD(ec, XHCI_EC_CAP_ID)) {
  • uspace/lib/bithenge/src/script.c

    rf712a85 r8ebe212  
    401401    const char *name)
    402402{
    403         for (transform_list_t * e = state->transform_list; e; e = e->next) {
     403        for (transform_list_t *e = state->transform_list; e; e = e->next) {
    404404                if (!str_cmp(e->name, name)) {
    405405                        bithenge_transform_inc_ref(e->transform);
  • uspace/lib/c/generic/malloc.c

    rf712a85 r8ebe212  
    874874 *
    875875 */
    876 void *realloc(void * const addr, const size_t size)
     876void *realloc(void *const addr, const size_t size)
    877877{
    878878        if (size == 0) {
     
    988988 *
    989989 */
    990 void free(void * const addr)
     990void free(void *const addr)
    991991{
    992992        if (addr == NULL)
     
    996996
    997997        /* Calculate the position of the header. */
    998         heap_block_head_t *head
    999             = (heap_block_head_t *) (addr - sizeof(heap_block_head_t));
     998        heap_block_head_t *head =
     999            (heap_block_head_t *) (addr - sizeof(heap_block_head_t));
    10001000
    10011001        block_check(head);
     
    10121012
    10131013        /* Look at the next block. If it is free, merge the two. */
    1014         heap_block_head_t *next_head
    1015             = (heap_block_head_t *) (((void *) head) + head->size);
     1014        heap_block_head_t *next_head =
     1015            (heap_block_head_t *) (((void *) head) + head->size);
    10161016
    10171017        if ((void *) next_head < area->end) {
Note: See TracChangeset for help on using the changeset viewer.