mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-07 10:20:29 +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;
|
||||
const char *name;
|
||||
const char *syspath;
|
||||
char varname[VARSIZE]; // stores "$VARNAME=". must immediately precede path.
|
||||
char varname[VARSIZE];
|
||||
char path[PATHSIZE];
|
||||
};
|
||||
_Static_assert(sizeof(struct PathSearcher) == PATHSIZE + 64,
|
||||
"struct layout");
|
||||
_Static_assert(offsetof(struct PathSearcher, varname) + VARSIZE ==
|
||||
offsetof(struct PathSearcher, path), "struct layout");
|
||||
|
||||
struct ApeLoader {
|
||||
struct PathSearcher ps;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue