Changeset 4430 for trunk/oscam-http-helpers.c
- Timestamp:
- 01/12/11 20:20:54 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-http-helpers.c
r4427 r4430 614 614 615 615 /* Format a seconds integer to hh:mm:ss or dd hh:mm:ss depending hrs >24 */ 616 char *sec2timeformat(int seconds) { 617 char *value = (char *) malloc((12 * sizeof(char))); 618 value[0] = '\0'; 616 char *sec2timeformat(struct templatevars *vars, int seconds) { 617 char *value; 618 if(!cs_malloc(&value, 12 * sizeof(char), -1)) 619 return ""; 620 619 621 int secs = 0, fullmins = 0, mins = 0, fullhours = 0, hours = 0, days = 0; 620 622 … … 634 636 else sprintf(value, "%02dd %02d:%02d:%02d", days, hours, mins, secs); 635 637 636 return value;638 return tpl_addTmp(vars, value); 637 639 } 638 640
Note:
See TracChangeset
for help on using the changeset viewer.