The caller ensures that ea_list_i() is never called with an
invalid type, so lets BUG() if we see one. This clears up
a couple of compiler warnings too.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
return 0;
if (er->er_data_len) {
- char *prefix;
- unsigned int l;
+ char *prefix = NULL;
+ unsigned int l = 0;
char c = 0;
if (ei->ei_size + ea_size > er->er_data_len)
prefix = "security.";
l = 9;
break;
- default:
- /* FIXME: Needs looking at again */
- break;
}
+ BUG_ON(l == 0);
+
memcpy(er->er_data + ei->ei_size, prefix, l);
memcpy(er->er_data + ei->ei_size + l, GFS2_EA2NAME(ea),
ea->ea_name_len);