Skip to content

Commit

Permalink
Change _MACRO to just MACRO
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdrake committed May 30, 2015
1 parent c69ea04 commit 0d8433e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions extension/boolexpr/dict.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
** From: http://planetmath.org/goodhashtableprimes
*/

#define _MIN_IDX 4
#define _MAX_IDX 30
#define MIN_IDX 4
#define MAX_IDX 30

static size_t _primes[] = {
0, 0, 0, 0,
Expand Down Expand Up @@ -96,13 +96,13 @@ struct BoolExprDict *
BoolExprDict_New(void)
{
struct BoolExprDict *dict;
size_t width = _primes[_MIN_IDX];
size_t width = _primes[MIN_IDX];

dict = malloc(sizeof(struct BoolExprDict));
if (dict == NULL)
return NULL; // LCOV_EXCL_LINE

dict->_pridx = _MIN_IDX;
dict->_pridx = MIN_IDX;
dict->length = 0;
dict->items = malloc(width * sizeof(struct BoolExprDictItem *));
if (dict->items == NULL) {
Expand Down Expand Up @@ -204,7 +204,7 @@ BoolExprDict_Insert(struct BoolExprDict *dict, struct BoolExpr *key, struct Bool

load = (double) dict->length / (double) _primes[dict->_pridx];

if (dict->_pridx < _MAX_IDX && load > MAX_LOAD) {
if (dict->_pridx < MAX_IDX && load > MAX_LOAD) {
if (!_enlarge(dict))
return false; // LCOV_EXCL_LINE
}
Expand Down
10 changes: 5 additions & 5 deletions extension/boolexpr/set.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
** From: http://planetmath.org/goodhashtableprimes
*/

#define _MIN_IDX 4
#define _MAX_IDX 30
#define MIN_IDX 4
#define MAX_IDX 30

static size_t _primes[] = {
0, 0, 0, 0,
Expand Down Expand Up @@ -95,13 +95,13 @@ struct BoolExprSet *
BoolExprSet_New(void)
{
struct BoolExprSet *set;
size_t width = _primes[_MIN_IDX];
size_t width = _primes[MIN_IDX];

set = malloc(sizeof(struct BoolExprSet));
if (set == NULL)
return NULL; // LCOV_EXCL_LINE

set->_pridx = _MIN_IDX;
set->_pridx = MIN_IDX;
set->length = 0;
set->items = malloc(width * sizeof(struct BoolExprSetItem *));
if (set->items == NULL) {
Expand Down Expand Up @@ -254,7 +254,7 @@ BoolExprSet_Insert(struct BoolExprSet *set, struct BoolExpr *key)

load = (double) set->length / (double) _primes[set->_pridx];

if (set->_pridx < _MAX_IDX && load > MAX_LOAD) {
if (set->_pridx < MAX_IDX && load > MAX_LOAD) {
if (!_enlarge(set))
return false; // LCOV_EXCL_LINE
}
Expand Down

0 comments on commit 0d8433e

Please sign in to comment.