summaryrefslogtreecommitdiffhomepage
path: root/src/core/ngx_config.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/ngx_config.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h
index 96569b893..d924ec5e8 100644
--- a/src/core/ngx_config.h
+++ b/src/core/ngx_config.h
@@ -98,8 +98,8 @@ typedef long ngx_flag_t;
#define NGX_ALIGNMENT sizeof(unsigned long) /* platform word */
#endif
-#define ngx_align(p) (u_char *) (((uintptr_t) p + (NGX_ALIGNMENT - 1)) \
- & ~(NGX_ALIGNMENT - 1))
+#define ngx_align(d, a) (((d) + (a - 1)) & ~(a - 1))
+#define ngx_align_ptr(p, a) (u_char *) (((uintptr_t) (p) + (a - 1)) & ~(a - 1))
#define ngx_abort abort