]> granicus.if.org Git - nethack/commitdiff
obj_nexto_xy lint
authorPatR <rankin@nethack.org>
Sat, 11 Apr 2015 01:31:11 +0000 (18:31 -0700)
committerPatR <rankin@nethack.org>
Sat, 11 Apr 2015 01:31:11 +0000 (18:31 -0700)
include/extern.h
src/mkobj.c

index 9df1a8eceb3353001cde77e3af60fe0157a6430e..7192bba42fa3b5f3a104c4f9c2ebf76fd0e61598 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.5 extern.h        $NHDT-Date: 1426966688 2015/03/21 19:38:08 $  $NHDT-Branch: master $:$NHDT-Revision: 1.411 $ */
+/* NetHack 3.5 extern.h        $NHDT-Date: 1428715841 2015/04/11 01:30:41 $  $NHDT-Branch: master $:$NHDT-Revision: 1.454 $ */
 /* NetHack 3.5 extern.h        $Date: 2013/11/05 00:57:53 $  $Revision: 1.380 $ */
 /* Copyright (c) Steve Creps, 1988.                              */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -1228,7 +1228,7 @@ E long FDECL(peek_at_iced_corpse_age, (struct obj *));
 E int FDECL(hornoplenty, (struct obj *,BOOLEAN_P));
 E void NDECL(obj_sanity_check);
 E struct obj* FDECL(obj_nexto, (struct obj*));
-E struct obj* FDECL(obj_nexto_xy, (int, int, int, int));
+E struct obj* FDECL(obj_nexto_xy, (int, int, int, unsigned));
 E struct obj* FDECL(obj_absorb, (struct obj**, struct obj**));
 E struct obj* FDECL(obj_meld, (struct obj**, struct obj**));
 
index 57c735ad38cfc9e35e21f87cc0785f8bba2ce3e6..0fd6ab589bd3e3e61ad0474d89546938780b8dc9 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.5 mkobj.c $NHDT-Date: 1426470337 2015/03/16 01:45:37 $  $NHDT-Branch: derek-farming $:$NHDT-Revision: 1.77 $ */
+/* NetHack 3.5 mkobj.c $NHDT-Date: 1428715841 2015/04/11 01:30:41 $  $NHDT-Branch: master $:$NHDT-Revision: 1.91 $ */
 /* NetHack 3.5 mkobj.c $Date: 2012/03/10 02:49:08 $  $Revision: 1.70 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -2163,7 +2163,8 @@ obj_nexto(otmp)
  */
 struct obj*
 obj_nexto_xy(otyp, x, y, oid)
-    int otyp, x, y, oid;
+int otyp, x, y;
+unsigned oid;
 {
     struct obj* otmp;
     int fx, fy, ex, ey;
@@ -2187,13 +2188,12 @@ obj_nexto_xy(otyp, x, y, oid)
         for (fy = ey; abs(fy - ey) < 3; fy += dy) {
             /* 0, 0 was checked above */
             if (fx != x || fy != y) {
-                if (otmp = sobj_at(otyp, fx, fy)) {
+                if ((otmp = sobj_at(otyp, fx, fy)) != 0) {
                     return otmp;
                 }
             }
         }
     }
-    
     return NULL;
 }