D | tc_util.c | 360 double per = strtod(str, &p) / 100.; in get_percent() local 362 if (per > 1. || per < 0) in get_percent() 367 *percent = (unsigned) rint(per * max_percent_value); in get_percent() 371 void print_percent(char *buf, int len, __u32 per) in print_percent() argument 373 snprintf(buf, len, "%g%%", 100. * (double) per / max_percent_value); in print_percent() 376 char * sprint_percent(__u32 per, char *buf) in sprint_percent() argument 378 print_percent(buf, SPRINT_BSIZE-1, per); in sprint_percent()
|