]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
make functions without arguments proper C99 functions
authorLennart Poettering <lennart@poettering.net>
Wed, 24 Mar 2010 20:03:04 +0000 (21:03 +0100)
committerDhaval Giani <dhaval.giani@gmail.com>
Fri, 26 Mar 2010 11:56:44 +0000 (12:56 +0100)
Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
include/libcgroup/error.h
src/api.c
src/config.c

index 9a463b9eb4b8e9928941482aede441635ea8f244..b725c18339e79cd528a16cabec85c7656f21979b 100644 (file)
@@ -55,7 +55,7 @@ const char *cgroup_strerror(int code);
 /**
  * Return last errno, which caused ECGOTHER error.
  */
-int cgroup_get_last_errno();
+int cgroup_get_last_errno(void);
 
 __END_DECLS
 
index cb708d7957e46963c0cc57ba56d6d13bc2b014a1..45326e172f217b65ee44b251a21f37f5f69397a2 100644 (file)
--- a/src/api.c
+++ b/src/api.c
@@ -617,7 +617,7 @@ unlock:
  * 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;
@@ -686,7 +686,7 @@ int cgroup_init()
        temp_ent = (struct mntent *) malloc(sizeof(struct mntent));
 
        if (!temp_ent) {
-               last_errno = errno; 
+               last_errno = errno;
                ret = ECGOTHER;
                goto unlock_exit;
        }
@@ -763,7 +763,7 @@ 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;
@@ -2388,7 +2388,7 @@ void cgroup_print_rules_config(FILE *fp)
  * 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;
@@ -2414,7 +2414,7 @@ finished:
  * 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;
@@ -2533,7 +2533,7 @@ const char *cgroup_strerror(int code)
 /**
  * Return last errno, which caused ECGOTHER error.
  */
-int cgroup_get_last_errno()
+int cgroup_get_last_errno(void)
 {
     return last_errno;
 }
index f89ef3692cea154d76522a5d61c693a03a3ecc43..36fa11eab54bc5cb71094081f3328efb98ca2157 100644 (file)
@@ -387,7 +387,7 @@ void cgroup_config_cleanup_namespace_table(void)
 /*
  * Start mounting the mount table.
  */
-int cgroup_config_mount_fs()
+int cgroup_config_mount_fs(void)
 {
        int ret;
        struct stat buff;
@@ -397,7 +397,7 @@ int cgroup_config_mount_fs()
                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;
@@ -425,7 +425,7 @@ int cgroup_config_mount_fs()
 /*
  * 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;