]> granicus.if.org Git - nethack/commitdiff
follow-on bits
authornhmall <nhmall@nethack.org>
Tue, 1 Oct 2019 21:47:45 +0000 (17:47 -0400)
committernhmall <nhmall@nethack.org>
Tue, 1 Oct 2019 21:47:45 +0000 (17:47 -0400)
src/options.c

index bddc35102597961bcf5c47891ec347a9314d8fd8..2e494948a4be6484e00e46ff0d09e88fb662f96e 100644 (file)
@@ -5326,8 +5326,7 @@ boolean setinitial, setfromfile;
             tmpwin = create_nhwindow(NHW_MENU);
             start_menu(tmpwin);
             if (numapes) {
-                ape = (struct autopickup_exception *)
-                    apelist;
+                ape = apelist;
                 any = zeroany;
                 add_menu(tmpwin, NO_GLYPH, &any, 0, 0, iflags.menu_headings,
                          "Always pickup '<'; never pickup '>'",
@@ -5952,8 +5951,8 @@ const char *mapping;
 
     ape->pattern = dupstr(text);
     ape->grab = grab;
-    ape->next = (struct autopickup_exception *) apelist;
-    apelist = (struct autopickup_exception *) ape;
+    ape->next = apelist;
+    apelist = ape;
     return 1;
 }
 
@@ -5985,6 +5984,7 @@ void
 free_autopickup_exceptions()
 {
     struct autopickup_exception *ape = apelist;
+
     while ((ape = apelist) != 0) {
       regex_free(ape->regex);
       free((genericptr_t) ape->pattern);