acl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] Add advanced error reporting


From: Mike Frysinger
Subject: Re: [PATCH 1/3] Add advanced error reporting
Date: Fri, 1 Dec 2023 06:38:26 -0500

On 26 Sep 2023 17:09, Bodo Eggert wrote:
> +/*char *advanced_errors[] = {
> +     "OK",
> +     "(generic)",
> +     "default acl exists",
> +     "User not found",
> +     "Error while looking up user",
> +     "Group not found",
> +     "Error while looking up group",
> +};*/

don't add dead code -> delete

> +char *advanced_errors[] = {

this is a global writable array of pointers.  this should be at least:

const char * const advanced_errors[] = {

but i would even go as far as marking it static and adding a helper like
get_advanced_error(int num) and have that return a const char * string.
-mike

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]