diff options
Diffstat (limited to 'erts/emulator/utils/make_driver_tab')
-rwxr-xr-x | erts/emulator/utils/make_driver_tab | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/erts/emulator/utils/make_driver_tab b/erts/emulator/utils/make_driver_tab index 0e6793d2af..5c68143d58 100755 --- a/erts/emulator/utils/make_driver_tab +++ b/erts/emulator/utils/make_driver_tab @@ -137,19 +137,19 @@ foreach (@nifs) { print " {NULL,NULL}\n};\n"; print <<EOF; -ErtsStaticNifInitFPtr erts_static_nif_get_nif_init(const char *name) { - int i; - for (i = 0; static_nif_tab[i].nif_name != NULL; i++) - if (strcmp(name,static_nif_tab[i].nif_name) == 0) - return static_nif_tab[i].nif_init; +ErtsStaticNifInitFPtr erts_static_nif_get_nif_init(const char *name, int len) { + ErtsStaticNifEntry* p; + for (p = static_nif_tab; p->nif_name != NULL; p++) + if (strncmp(p->nif_name, name, len) == 0 && p->nif_name[len] == 0) + return p->nif_init; return NULL; } int erts_is_static_nif(void *handle) { - int i; - for (i = 0; static_nif_tab[i].nif_name != NULL; i++) - if (((void*)static_nif_tab[i].nif_init) == handle) - return 1; + ErtsStaticNifEntry* p; + for (p = static_nif_tab; p->nif_name != NULL; p++) + if (((void*)p->nif_init) == handle) + return 1; return 0; } |