diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-11 14:14:52 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-11 14:14:52 +0000 |
commit | 83c09d3dc68b071ee5df2216360fe8856c2f74b6 (patch) | |
tree | 939637fe0b51b91b7ff7fc404b400e91ae803d3f /main | |
parent | 17a007be4c2f38d6d2a3d5ece077303def2f34c5 (diff) |
simplify calculation
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@129967 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/astmm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/astmm.c b/main/astmm.c index bc2cd824a..f5ce26f0a 100644 --- a/main/astmm.c +++ b/main/astmm.c @@ -476,10 +476,10 @@ static struct ast_cli_entry cli_memory[] = { void __ast_mm_init(void) { char filename[PATH_MAX]; - int pad; + size_t pad = sizeof(struct ast_region) - offsetof(struct ast_region, data); - if ((pad = (__alignof__(struct ast_region) - (offsetof(struct ast_region, data) % __alignof__(struct ast_region)))) != 0) { - ast_log(LOG_ERROR, "struct ast_region has %d bytes of padding! This must be eliminated for low-fence checking to work properly!\n", pad); + if (pad) { + ast_log(LOG_ERROR, "struct ast_region has %d bytes of padding! This must be eliminated for low-fence checking to work properly!\n", (int) pad); } ast_cli_register_multiple(cli_memory, sizeof(cli_memory) / sizeof(struct ast_cli_entry)); |