mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-07 18:30:28 +00:00
Better static assert
This commit is contained in:
parent
f8505690e3
commit
44da6d670a
1 changed files with 3 additions and 3 deletions
|
@ -203,11 +203,11 @@ struct PathSearcher {
|
||||||
unsigned long namelen;
|
unsigned long namelen;
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *syspath;
|
const char *syspath;
|
||||||
char varname[VARSIZE]; // stores "$VARNAME=". must immediately precede path.
|
char varname[VARSIZE];
|
||||||
char path[PATHSIZE];
|
char path[PATHSIZE];
|
||||||
};
|
};
|
||||||
_Static_assert(sizeof(struct PathSearcher) == PATHSIZE + 64,
|
_Static_assert(offsetof(struct PathSearcher, varname) + VARSIZE ==
|
||||||
"struct layout");
|
offsetof(struct PathSearcher, path), "struct layout");
|
||||||
|
|
||||||
struct ApeLoader {
|
struct ApeLoader {
|
||||||
struct PathSearcher ps;
|
struct PathSearcher ps;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue