| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 2/2] xfsprogs: xfs_quota: kill local variable "type" from free_f() |
| From: | Alex Elder <aelder@xxxxxxx> |
| Date: | Wed, 28 Sep 2011 06:44:34 -0500 |
| Cc: | Alex Elder <aelder@xxxxxxx> |
| In-reply-to: | <1317210274-13086-1-git-send-email-aelder@xxxxxxx> |
| In-reply-to: | <a14d653e8a238b3207c5076eb6e6f3358e433422.1317210237.git.aelder@xxxxxxx> |
| References: | <1317210274-13086-1-git-send-email-aelder@xxxxxxx> |
| References: | <a14d653e8a238b3207c5076eb6e6f3358e433422.1317210237.git.aelder@xxxxxxx> |
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 free_space_list() to indicate that.
Signed-off-by: Alex Elder <aelder@xxxxxxx>
---
quota/free.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/quota/free.c b/quota/free.c
index 71a7cb2..79b52e9 100644
--- a/quota/free.c
+++ b/quota/free.c
@@ -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);
--
1.7.6.2
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 0/2] xfsprogs: libxcmd: support wildcard for fs_table lookups, Alex Elder |
|---|---|
| Next by Date: | [PATCH 1/2] xfsprogs: libxcmd: allow 0 as a wildcard fs_table entry type selector, Alex Elder |
| Previous by Thread: | [PATCH 1/2] xfsprogs: libxcmd: allow 0 as a wildcard fs_table entry type selector, Alex Elder |
| Next by Thread: | Re: [PATCH 2/2] xfsprogs: xfs_quota: kill local variable "type" from free_f(), Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |