Make the error stings const, just to be safe.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
* @code: error code for which the corresponding error string is to be
* returned
*/
-char *cgroup_strerror(int code);
+const char *cgroup_strerror(int code);
/**
* Return last errno, which caused ECGOTHER error.
/* Namespace */
__thread char *cg_namespace_table[CG_CONTROLLER_MAX];
-char *cgroup_strerror_codes[] = {
+const char const *cgroup_strerror_codes[] = {
"Cgroup is not compiled in",
"Cgroup is not mounted",
"Cgroup does not exist",
return ret;
}
-char *cgroup_strerror(int code)
+const char *cgroup_strerror(int code)
{
if (code == ECGOTHER) {
return strerror_r(cgroup_get_last_errno(), errtext, MAXLEN);