Make two string parameters passed into cgroup_read_value_begin()
fully constant, i.e. const char * const. These parameters,
controller and name, are only used as read-only variables
within cgroup_read_value_begin() and are not intended to be
modified.
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Reviewed-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
* @return #ECGEOF when the stats file is empty.
*/
-int cgroup_read_value_begin(const char *controller, const char *path,
- char *name, void **handle, char *buffer, int max);
+int cgroup_read_value_begin(const char * const controller, const char *path,
+ const char * const name, void **handle, char *buffer, int max);
/**
* Read the next string from the given variable handle
return ret;
}
-int cgroup_read_value_begin(const char *controller, const char *path,
- char *name, void **handle, char *buffer, int max)
+int cgroup_read_value_begin(const char * const controller, const char *path,
+ const char * const name, void **handle, char *buffer, int max)
{
int ret = 0;
char *ret_c = NULL;