diff options
author | Pedro Alves <palves@redhat.com> | 2013-03-22 20:23:57 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-03-22 20:23:57 +0000 |
commit | d36a05d0bccfa05c14e22197b8b5e06000f675dd (patch) | |
tree | a389cb8cc9566f7aea903dca8fb9da3f3b9fd4f8 /gdb/cli/cli-setshow.c | |
parent | c6bbaa204f6aca87078c870466761f04bb36a0ea (diff) | |
download | gdb-d36a05d0bccfa05c14e22197b8b5e06000f675dd.tar.gz |
Whoops, wrong patch. Reverting.
Diffstat (limited to 'gdb/cli/cli-setshow.c')
-rw-r--r-- | gdb/cli/cli-setshow.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index 81b90e78a04..95ebbe7b65d 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) |