* test case and we can really make it thread safe.
*
*/
-int cgroup_init()
+int cgroup_init(void)
{
FILE *proc_mount = NULL;
struct mntent *ent = NULL;
temp_ent = (struct mntent *) malloc(sizeof(struct mntent));
if (!temp_ent) {
- last_errno = errno;
+ last_errno = errno;
ret = ECGOTHER;
goto unlock_exit;
}
return ret;
}
-static int cg_test_mounted_fs()
+static int cg_test_mounted_fs(void)
{
FILE *proc_mount = NULL;
struct mntent *ent = NULL;
* is probably NOT thread safe (calls cgroup_parse_rules()).
* @return 0 on success, > 0 on failure
*/
-int cgroup_reload_cached_rules()
+int cgroup_reload_cached_rules(void)
{
/* Return codes */
int ret = 0;
* Initializes the rules cache.
* @return 0 on success, > 0 on error
*/
-int cgroup_init_rules_cache()
+int cgroup_init_rules_cache(void)
{
/* Return codes */
int ret = 0;
/**
* Return last errno, which caused ECGOTHER error.
*/
-int cgroup_get_last_errno()
+int cgroup_get_last_errno(void)
{
return last_errno;
}
/*
* Start mounting the mount table.
*/
-int cgroup_config_mount_fs()
+int cgroup_config_mount_fs(void)
{
int ret;
struct stat buff;
struct cg_mount_table_s *curr = &(config_mount_table[i]);
ret = stat(curr->path, &buff);
-
+
if (ret < 0 && errno != ENOENT) {
last_errno = errno;
return ECGOTHER;
/*
* Actually create the groups once the parsing has been finished.
*/
-int cgroup_config_create_groups()
+int cgroup_config_create_groups(void)
{
int error = 0;
int i;