rtems_version_control_key() may return NULL

Chris Johns chrisj at rtems.org
Mon Sep 2 06:04:54 UTC 2019


On 2/9/19 3:58 pm, Sebastian Huber wrote:
> Hello,
> 
> the
> 
> const char *rtems_version_control_key( void )
> {
> #ifdef RTEMS_VERSION_VC_KEY
>   return RTEMS_VERSION_VC_KEY;
> #else
>   return NULL;
> #endif
> }
> 
> returns NULL, if no RTEMS_VERSION_VC_KEY is defined, e.g. the RTEMS sources are
> not managed by Git. Naive users like me may produce a NULL pointer if they use
> it like this printf("version: %s", rtems_version_control_key()). Should we
> change this function to return "" instead of NULL?
> 

"NO-VERSION-VC-KEY" ?

Chris



More information about the devel mailing list