Logo Search packages:      
Sourcecode: dballe version File versions

dba_err dba_record_key_unset ( dba_record  rec,
dba_keyword  parameter 
)

Remove a parameter from the record.

Parameters:
rec The record where the value is to be set.
parameter The parameter to remove.
Returns:
The error indicator for the function.

Definition at line 769 of file dba_record.c.

References dba_error_notfound.

{
      assert_is_dba_record(rec);

      if (parameter < 0 || parameter >= DBA_KEY_COUNT)
            return dba_error_notfound("keyword #%d is not in the range of valid keywords", parameter);

      /* Delete old value if it exists */
      if (rec->keydata[parameter] != NULL)
      {
            dba_var_delete(rec->keydata[parameter]);
            rec->keydata[parameter] = NULL;
      }
      return dba_error_ok();
}


Generated by  Doxygen 1.6.0   Back to index