[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] [PATCH] tar: remove unused macros
From: |
Paul Eggert |
Subject: |
[Bug-tar] [PATCH] tar: remove unused macros |
Date: |
Thu, 02 Sep 2010 20:49:02 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 |
I pushed this minor cleanup patch. I'm not sure what that
DIR_IS_NEW macro was for, but it looks like it may be a bug
that it's not being used, so I marked it with a FIXME and
commented it out rather than removing it entirely.
* src/create.c (UINTMAX_TO_CHARS): Remove; no longer used.
* src/tar.c (LOW_DENSITY_NUM, MID_DENSITY_NUM, HIGH_DENSITY_NUM):
Likewise.
* src/incremen.c (DIR_IS_NEW): Comment out; not used.
Mark this with a FIXME, since it looks like it should be used.
---
src/create.c | 2 +-
src/incremen.c | 2 +-
src/tar.c | 14 --------------
3 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/src/create.c b/src/create.c
index 2ca1d6e..9a4a282 100644
--- a/src/create.c
+++ b/src/create.c
@@ -219,7 +219,7 @@ to_base256 (int negative, uintmax_t value, char *where,
size_t size)
#define MINOR_TO_CHARS(val, where) minor_to_chars (val, where, sizeof (where))
#define MODE_TO_CHARS(val, where) mode_to_chars (val, where, sizeof (where))
#define UID_TO_CHARS(val, where) uid_to_chars (val, where, sizeof (where))
-#define UINTMAX_TO_CHARS(val, where) uintmax_to_chars (val, where, sizeof
(where))
+
#define UNAME_TO_CHARS(name,buf) string_to_chars (name, buf, sizeof(buf))
#define GNAME_TO_CHARS(name,buf) string_to_chars (name, buf, sizeof(buf))
diff --git a/src/incremen.c b/src/incremen.c
index 5f00944..96d0e40 100644
--- a/src/incremen.c
+++ b/src/incremen.c
@@ -43,7 +43,7 @@ enum children
#define DIR_IS_INITED(d) ((d)->flags & DIRF_INIT)
#define DIR_IS_NFS(d) ((d)->flags & DIRF_NFS)
#define DIR_IS_FOUND(d) ((d)->flags & DIRF_FOUND)
-#define DIR_IS_NEW(d) ((d)->flags & DIRF_NEW)
+/* #define DIR_IS_NEW(d) ((d)->flags & DIRF_NEW) FIXME: not used */
#define DIR_IS_RENAMED(d) ((d)->flags & DIRF_RENAMED)
#define DIR_SET_FLAG(d,f) (d)->flags |= (f)
diff --git a/src/tar.c b/src/tar.c
index 782ed3b..223de2c 100644
--- a/src/tar.c
+++ b/src/tar.c
@@ -1142,20 +1142,6 @@ add_file_id (const char *filename)
file_id_list = p;
}
-/* Default density numbers for [0-9][lmh] device specifications */
-
-#ifndef LOW_DENSITY_NUM
-# define LOW_DENSITY_NUM 0
-#endif
-
-#ifndef MID_DENSITY_NUM
-# define MID_DENSITY_NUM 8
-#endif
-
-#ifndef HIGH_DENSITY_NUM
-# define HIGH_DENSITY_NUM 16
-#endif
-
static void
update_argv (const char *filename, struct argp_state *state)
{
--
1.7.2
- [Bug-tar] [PATCH] tar: remove unused macros,
Paul Eggert <=