Ignore:
Timestamp:
Dec 7, 2024, 3:21:00 AM (7 months ago)
Author:
Bruno Cornec
Message:

create alloc_bkpinfo function and fix reset_bkpinfo proto

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/mondo/src/common/libmondo-tools.c

    r3892 r3898  
    893893}
    894894
    895 
    896895/**
    897896 * Reset all fields of the backup information structure to a sensible default.
    898897 * @param bkpinfo The @c bkpinfo to reset.
    899898 */
    900 void reset_bkpinfo()
    901 {
     899void alloc_bkpinfo(void) {
     900
     901if (! (bkpinfo = (struct s_bkpinfo *)malloc(sizeof(struct s_bkpinfo)))) {
     902        fatal_error("Cannot malloc bkpinfo");
     903    }
     904}
     905
     906/**
     907 * Reset all fields of the backup information structure to a sensible default.
     908 * @param bkpinfo The @c bkpinfo to reset.
     909 */
     910void reset_bkpinfo(void) {
     911
    902912    assert(bkpinfo != NULL);
    903913    memset((void *) bkpinfo, 0, sizeof(struct s_bkpinfo));
Note: See TracChangeset for help on using the changeset viewer.