hivex: Make limits into macros.
[hivex.git] / hivex / hivexsh.c
index 9c54536..6d83f0d 100644 (file)
@@ -58,6 +58,8 @@
 #include "hivex.h"
 #include "byte_conversions.h"
 
+#define HIVEX_MAX_VALUES         1000
+
 static int quit = 0;
 static int is_tty;
 static hive_h *h = NULL;
@@ -840,7 +842,7 @@ cmd_setval (char *nrvals_str)
              "setval", "nrvals", "xstrtol", xerr);
     return -1;
   }
-  if (nrvals < 0 || nrvals > 1000) {
+  if (nrvals < 0 || nrvals > HIVEX_MAX_VALUES) {
     fprintf (stderr, _("%s: %s: integer out of range\n"),
              "setval", "nrvals");
     return -1;
@@ -858,7 +860,6 @@ cmd_setval (char *nrvals_str)
   /* Read nrvals * 2 lines of input, nrvals * (key, value) pairs, as
    * explained in the man page.
    */
-  int prompt = isatty (0) ? 2 : 0;
   int i, j;
   for (i = 0; i < nrvals; ++i) {
     /* Read key. */