aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_config_command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ngx_config_command.c')
-rw-r--r--src/core/ngx_config_command.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/ngx_config_command.c b/src/core/ngx_config_command.c
new file mode 100644
index 000000000..51943021b
--- /dev/null
+++ b/src/core/ngx_config_command.c
@@ -0,0 +1,14 @@
+
+#include <ngx_config.h>
+
+char *ngx_conf_set_size_slot(char *conf, int offset, char *value)
+{
+ int size;
+
+ size = atoi(value);
+ if (size < 0)
+ return "value must be greater or equal to zero";
+
+ *(int *) (conf + offset) = size;
+ return NULL;
+}