Adjust number for reproducer
authorRalph Boehme <slow@samba.org>
Thu, 11 Feb 2016 14:29:24 +0000 (15:29 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 10 Jan 2023 14:07:34 +0000 (15:07 +0100)
enum.c

diff --git a/enum.c b/enum.c
index e64fb935ec1f8fa649b2e5fed4ee0ec3ec450172..030d9e5154409c1f6f66988970e4f499b6ee4f9c 100644 (file)
--- a/enum.c
+++ b/enum.c
@@ -105,13 +105,9 @@ static bool enumdir_check(DIR *dir,
  * seen in the the trace explorer.pcapng, plus one which is the one
  * triggering the seekdir() rewind.
  */
-#define ENUM1_NUM_1 374 + 1    /* p. 88 */
-#define ENUM1_NUM_2 1          /* p. 88 */
-#define ENUM1_NUM_3 374 + 1    /* p. 163 */
-
-#define ENUM2_NUM_1 374 + 1    /* p. 252 */
-#define ENUM2_NUM_2 373 + 1    /* p. 328 */
-#define ENUM2_NUM_3 6          /* p. 337, 2 actual results plus 6 missing */
+#define ENUM_NUM_1 372 + 1     /* p. 252 */
+#define ENUM_NUM_2 372 + 1     /* p. 328 */
+#define ENUM_NUM_3 9           /* 372 + 372 + 9 = 753 */
 
 int main(int argc, char **argv)
 {
@@ -130,14 +126,14 @@ int main(int argc, char **argv)
                ERROR(ERR_SYSCALL, "opendir %s error %s", dirpath, strerror(errno));
        }
 
-       ok = enumdir_check(dir2, true, ENUM2_NUM_1, NULL, &last_name);
+       ok = enumdir_check(dir2, true, ENUM_NUM_1, NULL, &last_name);
        if (!ok) {
                ERROR(ERR_CALL, "enum_check: %s", strerror(errno));
        }
 
        printf("Last entry: %s, rewound to it...\n", last_name);
 
-       ok = enumdir_check(dir2, true, ENUM2_NUM_2,
+       ok = enumdir_check(dir2, true, ENUM_NUM_2,
                           last_name, &last_name);
        if (!ok) {
                ERROR(ERR_CALL, "enum_check: %s", strerror(errno));
@@ -145,7 +141,7 @@ int main(int argc, char **argv)
 
        printf("Last entry: %s, rewound to it...\n", last_name);
 
-       ok = enumdir_check(dir2, true, ENUM2_NUM_3,
+       ok = enumdir_check(dir2, true, ENUM_NUM_3,
                           last_name, &last_name);
        if (!ok) {
                ERROR(ERR_CALL, "enum_check: %s", strerror(errno));