Changeset 4432


Ignore:
Timestamp:
01/12/11 20:55:42 (10 years ago)
Author:
alno
Message:

WebIf: Improve with defaults sec2timeformat function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/oscam-http-helpers.c

    r4430 r4432  
    615615/* Format a seconds integer to hh:mm:ss or dd hh:mm:ss depending hrs >24 */
    616616char *sec2timeformat(struct templatevars *vars, int seconds) {
     617
    617618    char *value;
    618619    if(!cs_malloc(&value, 12 * sizeof(char), -1))
    619         return "";
     620        return "00:00:00";
     621
     622    if(!seconds)
     623        return "00:00:00";
    620624
    621625    int secs = 0, fullmins = 0, mins = 0, fullhours = 0, hours = 0, days = 0;
Note: See TracChangeset for help on using the changeset viewer.