Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/devman.c

    rdf147c7 r8b1e15ac  
    266266        }
    267267       
    268         ssize_t read_bytes = safe_read(fd, buf, len);
    269         if (read_bytes <= 0) {
     268        if (read(fd, buf, len) <= 0) {
    270269                printf(NAME ": unable to read file '%s'.\n", conf_path);
    271270                goto cleanup;
    272271        }
    273         buf[read_bytes] = 0;
     272        buf[len] = 0;
    274273       
    275274        suc = parse_match_ids(buf, ids);
     
    11241123fun_node_t *find_fun_node_by_path(dev_tree_t *tree, char *path)
    11251124{
    1126         assert(path != NULL);
    1127 
    1128         bool is_absolute = path[0] == '/';
    1129         if (!is_absolute) {
    1130                 return NULL;
    1131         }
    1132 
    11331125        fibril_rwlock_read_lock(&tree->rwlock);
    11341126       
     
    11401132        char *rel_path = path;
    11411133        char *next_path_elem = NULL;
    1142         bool cont = true;
     1134        bool cont = (rel_path[0] == '/');
    11431135       
    11441136        while (cont && fun != NULL) {
     
    12231215        if (info != NULL) {
    12241216                memset(info, 0, sizeof(dev_class_info_t));
    1225                 link_initialize(&info->dev_classes);
    1226                 link_initialize(&info->devmap_link);
    1227                 link_initialize(&info->link);
     1217                list_initialize(&info->dev_classes);
     1218                list_initialize(&info->devmap_link);
     1219                list_initialize(&info->link);
    12281220        }
    12291221       
Note: See TracChangeset for help on using the changeset viewer.