Skip to content

Commit

Permalink
Use FLEX_ARRAY instead of []
Browse files Browse the repository at this point in the history
  • Loading branch information
markokr committed Feb 26, 2011
1 parent 2d690eb commit ab97565
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion usual/base.h
Expand Up @@ -84,7 +84,7 @@
/* how to specify array with unknown length */
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
#define FLEX_ARRAY
#elif defined(__GNUC__)
#elif defined(__GNUC__) && (__GNUC__ >= 3)
#define FLEX_ARRAY
#else
#define FLEX_ARRAY 1
Expand Down
2 changes: 1 addition & 1 deletion usual/hashtab-impl.h
Expand Up @@ -79,7 +79,7 @@ struct HashTab {
CxMem *ca;
unsigned size;
unsigned used;
struct HashItem tab[];
struct HashItem tab[FLEX_ARRAY];
};

/** Initialize HashTab */
Expand Down
2 changes: 1 addition & 1 deletion usual/strpool.h
Expand Up @@ -42,7 +42,7 @@ struct PStr {
/** String length */
int len;
/** Zero-terminated value */
char str[];
char str[FLEX_ARRAY];
};

/** Create new pool */
Expand Down

0 comments on commit ab97565

Please sign in to comment.