From: Pedro Alves Date: Fri, 22 Mar 2013 20:23:58 +0000 (+0000) Subject: Whoops, wrong patch. Reverting. X-Git-Tag: sid-snapshot-20130401~113 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab19f3254b64b17b7e5fed11cc89b65e8330146e;p=external%2Fbinutils.git Whoops, wrong patch. Reverting. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a4027c9..26dafe9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,12 +1,3 @@ -2013-03-22 Pedro Alves - Yao Qi - Mark Kettenis - - * cli/cli-setshow.c (do_set_command) : - Don't let the user set the value to UINT_MAX directly. - : Don't let the user set the value to INT_MAX - directly. - 2013-03-22 Jan Kratochvil * remote.c (remote_unpush_target): New function. diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index 81b90e7..95ebbe7 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -278,11 +278,7 @@ do_set_command (char *arg, int from_tty, struct cmd_list_element *c) if (c->var_type == var_uinteger && val == 0) val = UINT_MAX; - /* For var_uinteger, don't let the user set the value to - UINT_MAX directly, as that exposes an implementation detail - to the user interface. */ - else if ((c->var_type == var_uinteger && val >= UINT_MAX) - || (c->var_type == var_zuinteger && val > UINT_MAX)) + else if (val > UINT_MAX) error (_("integer %s out of range"), plongest (val)); if (*(unsigned int *) c->var != val) @@ -304,12 +300,7 @@ do_set_command (char *arg, int from_tty, struct cmd_list_element *c) if (val == 0 && c->var_type == var_integer) val = INT_MAX; - /* For var_integer, don't let the user set the value to - INT_MAX directly, as that exposes an implementation detail - to the user interface. */ - else if ((c->var_type == var_integer && val >= INT_MAX) - || (c->var_type == var_zinteger && val > INT_MAX) - || val < INT_MIN) + else if (val > INT_MAX || val < INT_MIN) error (_("integer %s out of range"), plongest (val)); if (*(int *) c->var != val)