]> git.pond.sub.org Git - empserver/commitdiff
Fix get_empobjp() not to reject EF_SECTOR
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 23 Feb 2008 06:59:10 +0000 (07:59 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 25 Feb 2008 20:50:25 +0000 (21:50 +0100)
There's no technical reason for rejecting sector access by id.  It's
unusual, but not wrong.

Also remove the superfluous test for EF_BAD; ef_ptr() covers that.

src/lib/subs/empobj.c

index 2a1cca6b88b56da8a94c11fa0b0548c31ec2f0ea..9df8068248f8412fd1425283d4cb1e7b12d29e4c 100644 (file)
@@ -60,8 +60,6 @@ obj_nameof(struct empobj *gp)
 struct empobj *
 get_empobjp(int type, int id)
 {
-    if (CANT_HAPPEN(type == EF_SECTOR || type == EF_BAD))
-       return NULL;
     return ef_ptr(type, id);
 }