]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/sect.c
Fix trailing whitespace
[empserver] / src / lib / subs / sect.c
index 02f979b5a3a92129fd9f422026e388b1103d01f9..cae10971ffdb769d388220063031378be7386f39 100644 (file)
  *  ---
  *
  *  sect.c: Sector pre-write and post-read data massage
- * 
+ *
  *  Known contributors to this file:
  *     Dave Pare, 1989
  *     Steve McClure, 1996
+ *     Markus Armbruster, 2004-2008
  */
 
 #include <config.h>
@@ -88,14 +89,9 @@ sct_prewrite(int id, void *old, void *new)
     }
 
     /* We've avoided assigning to sp->sct_own, in case oldsp == sp */
-    if (oldsp->sct_own != own) {
-       if (oldsp->sct_own)
-           makelost(EF_SECTOR, oldsp->sct_own,
-                    0, sp->sct_x, sp->sct_y);
-       if (own)
-           makenotlost(EF_SECTOR, own,
-                       0, sp->sct_x, sp->sct_y);
-    }
+    if (oldsp->sct_own != own)
+       lost_and_found(EF_SECTOR, oldsp->sct_own, own,
+                      0, sp->sct_x, sp->sct_y);
 
     sp->sct_own = own;
 }