[PATCH 2/2] histedit: Remove non-glibc fallback code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Kylie McClain <somasis@xxxxxxxxxxx>

This fallback code seems to go back the import of the repository back in 2005,
it fails on musl libc, and there aren't any comments explaining why this
difference is needed. Regardless, any compatibility ifdefs should probably be
checking macros defined on systems that need a different code path, rather than
just having fallback code for non-glibc.
---
 src/histedit.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/histedit.c b/src/histedit.c
index 94465d7..4498cf4 100644
--- a/src/histedit.c
+++ b/src/histedit.c
@@ -214,11 +214,7 @@ histcmd(int argc, char **argv)
 	if (argc == 1)
 		sh_error("missing history argument");
 
-#ifdef __GLIBC__
 	optind = 0;
-#else
-	optreset = 1; optind = 1; /* initialize getopt */
-#endif
 	while (not_fcnumber(argv[optind]) &&
 	      (ch = getopt(argc, argv, ":e:lnrs")) != -1)
 		switch ((char)ch) {
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux