Changeset 8ebe212 in mainline for uspace


Ignore:
Timestamp:
2018-04-13T12:39:06Z (8 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.

Location:
uspace
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 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.