src/util/user.c
/**
 * user_charge_deinit() - destroy charge object
 * @charge:     charge object to destroy
 *
 * This destroys a charge object that was previously initialized via
 * user_charge_init(). If the object was never charged, this is a no-op.
 * Otherwise, the charge is released and the object is re-initialized.
 */


This destroys a charge object that was previously initialized via
user_charge_init(). If the object was never charged, this is a no-op.
Otherwise, the charge is released and the object is re-initialized.
This destroys a charge object that was previously initialized via user_charge_init () . If the object was never charged this is a no - op . Otherwise the charge is released and the object is re - initialized .
void user_charge_deinit(UserCharge *charge) {
        if (charge->usage) {
                charge->usage->user->slots[charge->slot].n += charge->charge;
                charge->usage->slots[charge->slot] -= charge->charge;
                charge->usage = user_usage_unref(charge->usage);
                charge->slot = 0;
                charge->charge = 0;
        } else {
                c_assert(!charge->charge);
        }
}
void user_charge_deinit ( UserCharge * charge ) { if ( charge -> usage ) { charge -> usage -> user -> slots [ charge -> slot ] . n += charge -> charge ; charge -> usage -> slots [ charge -> slot ] -= charge -> charge ; charge -> usage = user_usage_unref ( charge -> usage ) ; charge -> slot = 0 ; charge -> charge = 0 ; } else { c_assert ( ! charge -> charge ) ; } }
user_charge_deinit() - destroy charge object
 @charge:     charge object to destroy
user_charge_deinit () - destroy charge object @charge : charge object to destroy