From 5b7a6af94e344cc9ae6fd7bd6416b9afa7d3b2b4 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 23 Feb 2008 07:59:10 +0100 Subject: [PATCH 1/1] Fix get_empobjp() not to reject EF_SECTOR 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 | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/subs/empobj.c b/src/lib/subs/empobj.c index 2a1cca6b8..9df806824 100644 --- a/src/lib/subs/empobj.c +++ b/src/lib/subs/empobj.c @@ -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); } -- 2.43.0