On 2/11/2020 6:03 AM, Richard Cochran wrote:
> The function to open a posix clock never modifies the passed in
> string.  This patch adds the const keyword to ensure this function
> stays that way.
> 
> Signed-off-by: Richard Cochran <richardcoch...@gmail.com>

Reviewed-by: Jacob Keller <jacob.e.kel...@intel.com>

> ---
>  util.c | 2 +-
>  util.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/util.c b/util.c
> index e64a93d..43d6224 100644
> --- a/util.c
> +++ b/util.c
> @@ -190,7 +190,7 @@ char *portaddr2str(struct PortAddress *addr)
>       return buf;
>  }
>  
> -clockid_t posix_clock_open(char *device, int *phc_index)
> +clockid_t posix_clock_open(const char *device, int *phc_index)
>  {
>       struct sk_ts_info ts_info;
>       char phc_device[19];
> diff --git a/util.h b/util.h
> index 60d28ac..11e0935 100644
> --- a/util.h
> +++ b/util.h
> @@ -116,7 +116,7 @@ char *portaddr2str(struct PortAddress *addr);
>   * @param phc_index  Returns the PHC index, if any.
>   * @return           A valid clock ID on success or CLOCK_INVALID otherwise.
>   */
> -clockid_t posix_clock_open(char *device, int *phc_index);
> +clockid_t posix_clock_open(const char *device, int *phc_index);
>  
>  /**
>   * Compare two port identities for equality.
> 


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to