utils: Constify the posix clock interface.
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 <richardcochran@gmail.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>master
parent
e4d1988f54
commit
9dcd6c31e7
2
util.c
2
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];
|
||||
|
|
2
util.h
2
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.
|
||||
|
|
Loading…
Reference in New Issue