aboutsummaryrefslogtreecommitdiffhomepage
path: root/builtin.cpp
diff options
context:
space:
mode:
authorGravatar Konrad Borowski <x.fix@o2.pl>2014-09-24 16:18:29 +0200
committerGravatar Konrad Borowski <x.fix@o2.pl>2014-09-24 16:18:29 +0200
commitbbce0909fe0f457a49f40b29e6a0bba240f594a0 (patch)
tree2744ed41b1129ec2e84005d7781757053cf349ca /builtin.cpp
parentc4a453fb227632bc7d39a2c204670911b8233e1c (diff)
Remove dead code in history builtin.
Diffstat (limited to 'builtin.cpp')
-rw-r--r--builtin.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin.cpp b/builtin.cpp
index a8478c4f..7e8c24f0 100644
--- a/builtin.cpp
+++ b/builtin.cpp
@@ -3852,7 +3852,7 @@ static int builtin_history(parser_t &parser, wchar_t **argv)
if (! history)
history = &history_t::history_with_name(L"fish");
- while ((opt = wgetopt_long_only(argc, argv, L"pdscvl", long_options, &opt_index)) != -1)
+ while ((opt = wgetopt_long_only(argc, argv, L"pdscvl", long_options, &opt_index)) != EOF)
{
switch (opt)
{
@@ -3880,9 +3880,6 @@ static int builtin_history(parser_t &parser, wchar_t **argv)
builtin_print_help(parser, argv[0], stdout_buffer);
return STATUS_BUILTIN_OK;
break;
- case EOF:
- /* Remainder are arguments */
- break;
case '?':
append_format(stderr_buffer, BUILTIN_ERR_UNKNOWN, argv[0], argv[woptind-1]);
return STATUS_BUILTIN_ERROR;