Changeset cf56332 in mainline


Ignore:
Timestamp:
2012-08-17T22:18:30Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1cf0a17
Parents:
0d7eb0f
Message:

isa: Minor refactoring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/isa/isa.c

    r0d7eb0f rcf56332  
    268268{
    269269        char *line = str;
     270        *next = NULL;
    270271
    271272        if (str == NULL) {
    272                 *next = NULL;
    273273                return NULL;
    274274        }
     
    280280        if (*str != '\0') {
    281281                *next = str + 1;
    282         } else {
    283                 *next = NULL;
    284282        }
    285283
     
    446444{
    447445        char *id = NULL;
    448         int score = 0;
    449446        char *end = NULL;
    450         int rc;
    451447
    452448        val = skip_spaces(val);
    453449
    454         score = (int)strtol(val, &end, 10);
     450        int score = (int)strtol(val, &end, 10);
    455451        if (val == end) {
    456452                ddf_msg(LVL_ERROR, "Cannot read match score for function "
     
    470466            "function %s", id, score, fun->fnode->name);
    471467
    472         rc = ddf_fun_add_match_id(fun->fnode, id, score);
     468        int rc = ddf_fun_add_match_id(fun->fnode, id, score);
    473469        if (rc != EOK) {
    474470                ddf_msg(LVL_ERROR, "Failed adding match ID: %s",
     
    575571static int isa_dev_add(ddf_dev_t *dev)
    576572{
    577         isa_bus_t *isa;
    578 
    579573        ddf_msg(LVL_DEBUG, "isa_dev_add, device handle = %d",
    580574            (int) dev->handle);
    581575
    582         isa = ddf_dev_data_alloc(dev, sizeof(isa_bus_t));
     576        isa_bus_t *isa = ddf_dev_data_alloc(dev, sizeof(isa_bus_t));
    583577        if (isa == NULL)
    584578                return ENOMEM;
     
    617611{
    618612        isa_bus_t *isa = ISA_BUS(dev);
    619         int rc;
    620613
    621614        fibril_mutex_lock(&isa->mutex);
     
    625618                    isa_fun_t, bus_link);
    626619
    627                 rc = ddf_fun_offline(fun->fnode);
     620                int rc = ddf_fun_offline(fun->fnode);
    628621                if (rc != EOK) {
    629622                        fibril_mutex_unlock(&isa->mutex);
Note: See TracChangeset for help on using the changeset viewer.