Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 7e20bee in mainline


Ignore:
Timestamp:
2017-10-04T21:53:19Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
0cebbac
Parents:
8974294
Message:

Provide flag conversion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/nettl/src/amap.c

    r8974294 r7e20bee  
    5959#include <stdlib.h>
    6060
     61/** Convert association map flags to port range flags.
     62 *
     63 * @param flags Association map flags
     64 * @return Port range flags
     65 */
    6166static portrng_flags_t aflags_to_pflags(amap_flags_t flags)
    6267{
    63         // FIXME: either use a single type, or provide a proper conversion
    64         return (portrng_flags_t) flags;
     68        portrng_flags_t pflags;
     69
     70        pflags = 0;
     71        if ((flags & af_allow_system) != 0)
     72                pflags |= pf_allow_system;
     73
     74        return pflags;
    6575}
    6676
Note: See TracChangeset for help on using the changeset viewer.