Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

apparmor: Use str_yes_no() helper function

Remove hard-coded strings by using the str_yes_no() helper function.

Fix a typo in a comment: s/unpritable/unprintable/

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: John Johansen <john.johansen@canonical.com>

authored by

Thorsten Blum and committed by
John Johansen
c602537d 40384c84

+4 -4
+4 -4
security/apparmor/apparmorfs.c
··· 997 997 998 998 switch (fs_file->v_type) { 999 999 case AA_SFS_TYPE_BOOLEAN: 1000 - seq_printf(seq, "%s\n", fs_file->v.boolean ? "yes" : "no"); 1000 + seq_printf(seq, "%s\n", str_yes_no(fs_file->v.boolean)); 1001 1001 break; 1002 1002 case AA_SFS_TYPE_STRING: 1003 1003 seq_printf(seq, "%s\n", fs_file->v.string); ··· 1006 1006 seq_printf(seq, "%#08lx\n", fs_file->v.u64); 1007 1007 break; 1008 1008 default: 1009 - /* Ignore unpritable entry types. */ 1009 + /* Ignore unprintable entry types. */ 1010 1010 break; 1011 1011 } 1012 1012 ··· 1152 1152 struct aa_label *label; 1153 1153 1154 1154 label = begin_current_label_crit_section(); 1155 - seq_printf(seq, "%s\n", label->size > 1 ? "yes" : "no"); 1155 + seq_printf(seq, "%s\n", str_yes_no(label->size > 1)); 1156 1156 end_current_label_crit_section(label); 1157 1157 1158 1158 return 0; ··· 1175 1175 } 1176 1176 } 1177 1177 1178 - seq_printf(seq, "%s\n", count > 1 ? "yes" : "no"); 1178 + seq_printf(seq, "%s\n", str_yes_no(count > 1)); 1179 1179 end_current_label_crit_section(label); 1180 1180 1181 1181 return 0;