Subject: logprof - variable definitions should not have trailing commas.

This patch fixes a logprof bug where when profiles with variable
declarations at the top level (not hidden in an include) were written
back to a file, a trailing comma was being added to the declaration
statement, which is invalid apparmor policy syntax. This patch corrects
this and no longer adds the trailing comma.
This commit is contained in:
Steve Beattie 2011-02-04 21:16:20 -08:00
parent 05450ac38a
commit 3cb964c5ee

View file

@ -5616,7 +5616,7 @@ sub var_transform($) {
sub writelistvars ($$) { sub writelistvars ($$) {
my ($prof_data, $depth) = @_; my ($prof_data, $depth) = @_;
return write_pair($prof_data, $depth, '', 'lvar', "", " = ", ",", \&var_transform); return write_pair($prof_data, $depth, '', 'lvar', "", " = ", "", \&var_transform);
} }
sub writecap_rules ($$$) { sub writecap_rules ($$$) {