Whoops, wrong patch. Reverting.
authorPedro Alves <palves@redhat.com>
Fri, 22 Mar 2013 20:23:58 +0000 (20:23 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 22 Mar 2013 20:23:58 +0000 (20:23 +0000)
gdb/ChangeLog
gdb/cli/cli-setshow.c

index a4027c9e6bde4bc575ca48c39383089bf9bc9cab..26dafe9eada213971efa8516f377b5d0be594ce5 100644 (file)
@@ -1,12 +1,3 @@
-2013-03-22  Pedro Alves  <palves@redhat.com>
-           Yao Qi  <yao@codesourcery.com>
-           Mark Kettenis  <kettenis@gnu.org>
-
-       * cli/cli-setshow.c (do_set_command) <var_uinteger>:
-       Don't let the user set the value to UINT_MAX directly.
-       <var_integer>: Don't let the user set the value to INT_MAX
-       directly.
-
 2013-03-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * remote.c (remote_unpush_target): New function.
index 81b90e78a048083f5813e816d7f2c868034e54c2..95ebbe7b65d860108703285ea957a9207cdf6844 100644 (file)
@@ -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)
This page took 0.031429 seconds and 4 git commands to generate.