We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a simple memory-corruption safeguard that's relatively common:
foo.h:
struct CompFoo { #define FOO_MAGIC 0x0112112 int magic; char *blatti; ... };
foo.c:
struct CompFoo *f = malloc.... f->magic = FOO_MAGIC; ...
other.c:
int otherFunc(CompFoo *f, char bah) { assert(f->magic == FOO_MAGIC); ... }
This is a very simple way to catch some basic corruption issues and it's virtually free.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is a simple memory-corruption safeguard that's relatively common:
foo.h:
struct CompFoo {
#define FOO_MAGIC 0x0112112
int magic;
char *blatti;
...
};
foo.c:
struct CompFoo *f = malloc....
f->magic = FOO_MAGIC;
...
other.c:
int otherFunc(CompFoo *f, char bah) {
assert(f->magic == FOO_MAGIC);
...
}
This is a very simple way to catch some basic corruption issues and it's virtually free.
The text was updated successfully, but these errors were encountered: