]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_spaceman: remove typedef usage
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 9 Sep 2019 19:37:07 +0000 (15:37 -0400)
committerEric Sandeen <sandeen@redhat.com>
Mon, 9 Sep 2019 19:37:07 +0000 (15:37 -0400)
Kill off the struct typedefs inside spaceman.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
spaceman/file.c
spaceman/freesp.c
spaceman/space.h

index f96a29e53d567b21815429640fe0539dc2c5721b..5647ca7df21519ac8d2286d5e405a2f99a83592e 100644 (file)
 
 static cmdinfo_t print_cmd;
 
-fileio_t       *filetable;
+struct fileio  *filetable;
 int            filecount;
-fileio_t       *file;
+struct fileio  *file;
 
 static void
 print_fileio(
-       fileio_t        *file,
+       struct fileio   *file,
        int             index,
        int             braces)
 {
@@ -101,8 +101,8 @@ addfile(
        }
 
        /* Extend the table of currently open files */
-       filetable = (fileio_t *)realloc(filetable,      /* growing */
-                                       ++filecount * sizeof(fileio_t));
+       filetable = (struct fileio *)realloc(filetable, /* growing */
+                                       ++filecount * sizeof(struct fileio));
        if (!filetable) {
                perror("realloc");
                filecount = 0;
index 034f234068174e8f2d32c5f6df105877ac062e8b..527ecb520993d50b0d2e978bae9102dcb5cc4673 100644 (file)
 #include "space.h"
 #include "input.h"
 
-typedef struct histent
+struct histent
 {
        long long       low;
        long long       high;
        long long       count;
        long long       blocks;
-} histent_t;
+};
 
 static int             agcount;
 static xfs_agnumber_t  *aglist;
-static histent_t       *hist;
+static struct histent  *hist;
 static int             dumpflag;
 static long long       equalsize;
 static long long       multsize;
@@ -82,7 +82,7 @@ hcmp(
        const void      *a,
        const void      *b)
 {
-       return ((histent_t *)a)->low - ((histent_t *)b)->low;
+       return ((struct histent *)a)->low - ((struct histent *)b)->low;
 }
 
 static void
index b246f602cf4afc819bfae76c8fdef145049fb0a9..8b224acabfc020784250be3165156633123914d2 100644 (file)
@@ -6,16 +6,16 @@
 #ifndef XFS_SPACEMAN_SPACE_H_
 #define XFS_SPACEMAN_SPACE_H_
 
-typedef struct fileio {
+struct fileio {
        struct xfs_fsop_geom geom;              /* XFS filesystem geometry */
        struct fs_path  fs_path;        /* XFS path information */
        char            *name;          /* file name at time of open */
        int             fd;             /* open file descriptor */
-} fileio_t;
+};
 
-extern fileio_t                *filetable;     /* open file table */
+extern struct fileio   *filetable;     /* open file table */
 extern int             filecount;      /* number of open files */
-extern fileio_t                *file;          /* active file in file table */
+extern struct fileio   *file;          /* active file in file table */
 
 extern int     openfile(char *, struct xfs_fsop_geom *, struct fs_path *);
 extern int     addfile(char *, int , struct xfs_fsop_geom *, struct fs_path *);