]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: xfs_quota: kill local variable "type" from free_f()
authorAlex Elder <aelder@sgi.com>
Wed, 28 Sep 2011 11:44:34 +0000 (11:44 +0000)
committerAlex Elder <aelder@sgi.com>
Thu, 29 Sep 2011 14:33:28 +0000 (09:33 -0500)
Only one value is ever really used for the  "type" variable in
free_f(), and it indicates that either type of entry in fs_table
is wanted.  Just get rid of the variable and make use of the
ability to provide 0 to fs_cursor_initialise() to indicate that.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
quota/free.c

index 71a7cb29659663c4b73ed9aa434d7f851f537bdc..79b52e910901ef8fe4fc9640cc506e2578edeb7a 100644 (file)
@@ -297,14 +297,13 @@ static void
 free_space_list(
        FILE                    *fp,
        uint                    form,
-       uint                    type,
        char                    *dir,
        uint                    flags)
 {
        fs_cursor_t             cursor;
        fs_path_t               *path;
 
-       fs_cursor_initialise(dir, type, &cursor);
+       fs_cursor_initialise(dir, 0, &cursor);
        while ((path = fs_cursor_next_entry(&cursor))) {
                if (free_space(fp, form, path, flags))
                        flags |= NO_HEADER_FLAG;
@@ -318,7 +317,7 @@ free_f(
 {
        FILE            *fp = NULL;
        char            *fname = NULL;
-       int             c, flags = 0, form = 0, type = 0;
+       int             c, flags = 0, form = 0;
 
        while ((c = getopt(argc, argv, "bf:hNir")) != EOF) {
                switch (c) {
@@ -348,16 +347,13 @@ free_f(
        if (!form)
                form = XFS_BLOCK_QUOTA;
 
-       if (!type)
-               type = FS_MOUNT_POINT|FS_PROJECT_PATH;
-
        if ((fp = fopen_write_secure(fname)) == NULL)
                return 0;
 
        if (argc == optind)
-               free_space_list(fp, form, type, NULL, flags);
+               free_space_list(fp, form, NULL, flags);
        else while (argc > optind)
-               free_space_list(fp, form, type, argv[optind++], flags);
+               free_space_list(fp, form, argv[optind++], flags);
 
        if (fname)
                fclose(fp);