summaryrefslogtreecommitdiff
path: root/src/mapi/mapi/stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapi/mapi/stub.c')
-rw-r--r--src/mapi/mapi/stub.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mapi/mapi/stub.c b/src/mapi/mapi/stub.c
index 9a5c1d694b..99b475a3b4 100644
--- a/src/mapi/mapi/stub.c
+++ b/src/mapi/mapi/stub.c
@@ -27,7 +27,6 @@
*/
#include <stdlib.h>
-#include <stddef.h> /* for offsetof */
#include <string.h>
#include <assert.h>
@@ -40,9 +39,9 @@
#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
struct mapi_stub {
- mapi_func addr;
- int slot;
const void *name;
+ int slot;
+ mapi_func addr;
};
/* define public_string_pool and public_stubs */
@@ -203,5 +202,6 @@ stub_get_slot(const struct mapi_stub *stub)
mapi_func
stub_get_addr(const struct mapi_stub *stub)
{
- return stub->addr;
+ assert(stub->addr || (unsigned int) stub->slot < MAPI_TABLE_NUM_STATIC);
+ return (stub->addr) ? stub->addr : entry_get_public(stub->slot);
}