nginx/src/core/ngx_config_command.c

27 lines
505 B
C
Raw Normal View History

2002-09-11 23:18:33 +08:00
#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;
}
2002-09-16 23:01:44 +08:00
char *ngx_conf_set_time_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;
}