Changeset a325832 in mainline for uspace/app/top/top.c


Ignore:
Timestamp:
2010-04-09T09:09:49Z (14 years ago)
Author:
Stanislav Kozina <stanislav.kozina@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
faf38b2
Parents:
7a3ccbc
Message:

Fixed division by zero in top.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/top/top.c

    r7a3ccbc ra325832  
    111111
    112112        /* For all tasks compute sum and differencies of all cycles */
    113         uint64_t mem_total = 0;
    114         uint64_t ucycles_total = 0;
    115         uint64_t kcycles_total = 0;
     113        uint64_t mem_total = 1; /*< Must NOT be null! */
     114        uint64_t ucycles_total = 1; /*< Must NOT be null! */
     115        uint64_t kcycles_total = 1; /*< Must NOT be null! */
    116116        uint64_t *ucycles_diff = malloc(new_data->task_count * sizeof(uint64_t));
    117117        uint64_t *kcycles_diff = malloc(new_data->task_count * sizeof(uint64_t));
Note: See TracChangeset for help on using the changeset viewer.