[apparmor] [PATCH 9/8 :) ] parser Fix const char warnings

Steve Beattie steve at nxnw.org
Tue Oct 1 18:01:20 UTC 2013


On Fri, Sep 27, 2013 at 05:17:43PM -0700, Tyler Hicks wrote:
> On 2013-09-13 16:52:47, Steve Beattie wrote:
> > Finally, a patch of my own. This patch addresses a bunch of the compiler
> > string conversion warnings that were introduced with the C++-ification
> > patch.
> > 
> > Signed-off-by: Steve Beattie <steve at nxnw.org>
> > @@ -284,8 +284,8 @@ extern void free_cond_entry(struct cond_
> >  extern void free_cond_list(struct cond_entry *ents);
> >  extern void print_cond_entry(struct cond_entry *ent);
> >  extern char *processid(char *string, int len);
> 
> We should probably const the string param in processid() while we're at
> it.

Incorporated.

> It is safe to get rid of the if statement and just unconditionally free
> filename. It is initialized to NULL and now that OPTION_STDOUT does a
> strdup(), all options either assign filename using a memory allocation
> function or don't assign anything to it at all.
> 
> It is extremely minor and I don't care either way, but I thought I'd
> mention it.

Incorporated this change as well.

> Everything else looks good!
> 
> Acked-by: Tyler Hicks <tyhicks at canonical.com>

Thanks!

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20131001/0c3c5b71/attachment.pgp>


More information about the AppArmor mailing list