The aft event handler needs to know the bit number of the attribute which is
being removed in order to clear the bit in the afs info structure of each row
of the audio file table. The handler does not need to know the attribute's
name, though, and remove_attribute() already prints it, so remove this field
from the event data structure.
* Used as data for \ref afs_event() for events of type \p ATTRIBUTE_ADD.
*/
struct rmatt_event_data {
- /** The name of the attribute being added. */
- const char *name;
- /** Its bit number. */
+ /** The bit number of the attribute being removed. */
unsigned char bitnum;
};
switch (event) {
case ATTRIBUTE_REMOVE: {
const struct rmatt_event_data *red = data;
- para_printf(pb, "clearing attribute %s (bit %u) from all "
- "entries in the audio file table\n", red->name,
- red->bitnum);
+ para_printf(pb, "clearing bit #%u from all entries in the " \
+ "audio file table\n", red->bitnum);
return audio_file_loop(data, clear_attribute);
} case AFSI_CHANGE: {
struct afsi_change_event_data *aced = data;
{
struct afs_callback_arg *aca = data;
int ret;
- struct rmatt_event_data red = {.name = name};
+ struct rmatt_event_data red;
ret = get_attribute_bitnum_by_name(name, &red.bitnum);
if (ret < 0) {