Add const to some char * parameters that are not changed by the called routine.
Signed-off-by: Mark Rustad <mark.d.rus...@intel.com> --- usr/sysfs.c | 4 ++-- usr/sysfs.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/sysfs.c b/usr/sysfs.c index 8c176f0..cb9cf08 100644 --- a/usr/sysfs.c +++ b/usr/sysfs.c @@ -547,7 +547,7 @@ found: } -char *sysfs_get_value(char *id, char *subsys, char *param) +char *sysfs_get_value(const char *id, char *subsys, char *param) { char devpath[PATH_SIZE]; char *sysfs_value; @@ -590,7 +590,7 @@ int sysfs_get_uint(char *id, char *subsys, char *param, return 0; } -int sysfs_get_int(char *id, char *subsys, char *param, int *value) +int sysfs_get_int(const char *id, char *subsys, char *param, int *value) { char *sysfs_value; diff --git a/usr/sysfs.h b/usr/sysfs.h index 4c70dbd..f5e13b3 100644 --- a/usr/sysfs.h +++ b/usr/sysfs.h @@ -51,10 +51,10 @@ extern char *sysfs_attr_get_value(const char *devpath, const char *attr_name); extern int sysfs_resolve_link(char *path, size_t size); extern int sysfs_lookup_devpath_by_subsys_id(char *devpath, size_t len, const char *subsystem, const char *id); -extern char *sysfs_get_value(char *id, char *subsys, char *param); +extern char *sysfs_get_value(const char *id, char *subsys, char *param); extern int sysfs_get_uint(char *id, char *subsys, char *param, unsigned int *value); -extern int sysfs_get_int(char *id, char *subsys, char *param, int *value); +extern int sysfs_get_int(const char *id, char *subsys, char *param, int *value); extern int sysfs_get_str(char *id, char *subsys, char *param, char *value, int value_size); extern int sysfs_get_uint64(char *id, char *subsys, char *param, -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To post to this group, send email to open-iscsi@googlegroups.com. To unsubscribe from this group, send email to open-iscsi+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/open-iscsi?hl=en.