~james-page/ubuntu/saucy/openvswitch/1.12-snapshot

« back to all changes in this revision

Viewing changes to lib/hmap.c

  • Committer: James Page
  • Date: 2013-08-21 10:16:57 UTC
  • mfrom: (1.1.20)
  • Revision ID: james.page@canonical.com-20130821101657-3o0z0qeiv5zkwlzi
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2008, 2009, 2010, 2012 Nicira, Inc.
 
2
 * Copyright (c) 2008, 2009, 2010, 2012, 2013 Nicira, Inc.
3
3
 *
4
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
5
 * you may not use this file except in compliance with the License.
90
90
    struct hmap tmp;
91
91
    size_t i;
92
92
 
93
 
    ovs_assert(!(new_mask & (new_mask + 1)));
94
 
    ovs_assert(new_mask != SIZE_MAX);
 
93
    ovs_assert(is_pow2(new_mask + 1));
95
94
 
96
95
    hmap_init(&tmp);
97
96
    if (new_mask) {