Return to listing7.c CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / confuse / doc |
1.1 misho 1: int validate_unsigned_int(cfg_t *cfg, cfg_opt_t *opt) 2: { 3: int value = cfg_opt_getnint(opt, cfg_opt_size(opt) - 1); 4: if(value < 0) 5: { 6: cfg_error(cfg, "integer option '%s' must be positive in section '%s'", 7: opt->name, cfg->name); 8: return -1; 9: } 10: return 0; 11: } 12: