]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/tend.c
load tend: Avoid "may be used uninitialized" warnings
[empserver] / src / lib / commands / tend.c
index 5bce717724129dbddd6a99bc12bc5c1f372948f6..3f037714cd5995df0694f981407366b4e44dbb1e 100644 (file)
@@ -30,7 +30,7 @@
  *     Dave Pare, 1986
  *     Thomas Ruschak, 1992
  *     Steve McClure, 2000
- *     Markus Armbruster, 2004-2017
+ *     Markus Armbruster, 2004-2021
  */
 
 #include <config.h>
@@ -70,10 +70,10 @@ c_tend(void)
                 buf);
     if (!p || !*p)
        return RET_SYN;
-
+    ip = item_by_name(p);
     if (!strncmp(p, "land", 4))
        type = EF_LAND;
-    else if (NULL != (ip = item_by_name(p)))
+    else if (ip)
        type = EF_SECTOR;
     else {
        pr("Can't tend '%s'\n", p);