Changeset 16ac756 in mainline for uspace/lib/c/generic/net/packet.c


Ignore:
Timestamp:
2010-11-07T19:47:27Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
88b127b, 9ce7eb5
Parents:
9fd39d6
Message:

Get rid of the ERROR_CODE madness in libc/net.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/net/packet.c

    r9fd39d6 r16ac756  
    4141#include <unistd.h>
    4242#include <errno.h>
    43 #include <err.h>
    4443
    4544#include <sys/mman.h>
     
    9190int pm_init(void)
    9291{
    93         ERROR_DECLARE;
     92        int rc;
    9493
    9594        fibril_rwlock_initialize(&pm_globals.lock);
     95       
    9696        fibril_rwlock_write_lock(&pm_globals.lock);
    97         ERROR_PROPAGATE(gpm_initialize(&pm_globals.packet_map));
     97        rc = gpm_initialize(&pm_globals.packet_map);
    9898        fibril_rwlock_write_unlock(&pm_globals.lock);
    99         return EOK;
     99       
     100        return rc;
    100101}
    101102
     
    139140int pm_add(packet_t packet)
    140141{
    141         ERROR_DECLARE;
    142 
    143142        packet_map_ref map;
     143        int rc;
    144144
    145145        if (!packet_is_valid(packet))
     
    160160                        }
    161161                        bzero(map, sizeof(packet_map_t));
    162                         if ((ERROR_CODE =
    163                             gpm_add(&pm_globals.packet_map, map)) < 0) {
     162                        rc = gpm_add(&pm_globals.packet_map, map);
     163                        if (rc < 0) {
    164164                                fibril_rwlock_write_unlock(&pm_globals.lock);
    165165                                free(map);
    166                                 return ERROR_CODE;
     166                                return rc;
    167167                        }
    168168                } while (PACKET_MAP_PAGE(packet->packet_id) >=
Note: See TracChangeset for help on using the changeset viewer.