local array of structures not declared static

Jeffrey Hutzelman jhutz at cmu.edu
Thu Dec 8 13:56:39 EST 2005



On Tuesday, December 06, 2005 04:27:47 PM +0200 Denis Vlasenko 
<vda at ilport.com.ua> wrote:

> Hi,
>
> krb5-1.4.3/src/lib/kadm5/logger.c:
>
>
>                        /*
>                          * If there is a facility present, then parse
> that.                          */
>                         if (cp2) {
>                             const struct {
>                                 const char *name;
>                                 int value;
>                             } facilities[] = {
>                                 { "AUTH",       LOG_AUTH        },
># ifdef  LOG_AUTHPRIV
>                                 { "AUTHPRIV",   LOG_AUTHPRIV    },
># endif  /* LOG_AUTHPRIV */
># ifdef  LOG_KERN
>                                 { "KERN",       LOG_KERN        },
># endif  /* LOG_KERN */
>
>
> Shouldn't we add "static" before "const" here?

I guess I'd be midly surprised if that actually had an effect on code 
generation in this case.  But I don't see how it could hurt, either.


More information about the krbdev mailing list