[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Findutils-patches] [PATCH 3/3] Eliminate some obsolete code.
From: |
James Youngman |
Subject: |
[Findutils-patches] [PATCH 3/3] Eliminate some obsolete code. |
Date: |
Mon, 5 Apr 2010 01:22:53 +0100 |
* locate/locate.c (search_one_database): Remove obsolete code
(alternative size for procdata.pathsize).
* lib/buildcmd.c (get_line_max): Remove obsolete function.
Signed-off-by: James Youngman <address@hidden>
---
ChangeLog | 5 +++++
lib/buildcmd.c | 30 ------------------------------
locate/locate.c | 4 ----
3 files changed, 5 insertions(+), 34 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a70c6a7..ab0766c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2010-04-05 James Youngman <address@hidden>
+ Eliminate some obsolete code.
+ * locate/locate.c (search_one_database): Remove obsolete code
+ (alternative size for procdata.pathsize).
+ * lib/buildcmd.c (get_line_max): Remove obsolete function.
+
Remove obsolete code from savedirinfo.c.
* lib/savedirinfo.c (new_savedirinfo): Rename new_savedirinfo to
savedirinfo.
diff --git a/lib/buildcmd.c b/lib/buildcmd.c
index 23fa528..b89a16a 100644
--- a/lib/buildcmd.c
+++ b/lib/buildcmd.c
@@ -443,36 +443,6 @@ bc_push_arg (struct buildcmd_control *ctl,
}
}
-#if 0
-/* We used to set posix_arg_size_min to the LINE_MAX limit, but
- * currently we use _POSIX_ARG_MAX (which is the minimum value).
- */
-static size_t
-get_line_max (void)
-{
- long val;
-#ifdef _SC_LINE_MAX
- val = sysconf (_SC_LINE_MAX);
-#else
- val = -1;
-#endif
-
- if (val > 0)
- return val;
-
- /* either _SC_LINE_MAX was not available or
- * there is no particular limit.
- */
-#ifdef LINE_MAX
- val = LINE_MAX;
-#endif
-
- if (val > 0)
- return val;
-
- return 2048L; /* a reasonable guess. */
-}
-#endif
size_t
bc_get_arg_max (void)
diff --git a/locate/locate.c b/locate/locate.c
index 48daa98..a32cb43 100644
--- a/locate/locate.c
+++ b/locate/locate.c
@@ -1095,11 +1095,7 @@ search_one_database (int argc,
lastinspector = NULL;
past_pat_inspector = NULL;
results_were_filtered = false;
-#if 0
- procdata.pathsize = 1026; /* Increased as necessary by locate_read_str.
*/
-#else
procdata.pathsize = 128; /* Increased as necessary by locate_read_str.
*/
-#endif
procdata.original_filename = xmalloc (procdata.pathsize);
--
1.7.0