Permalink
Browse files

Eradicate one more sprintf().

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14763 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information...
1 parent bfccd68 commit 4fde43407f37561bfd1f95ca4e7093ad82a78760 @xavierleroy xavierleroy committed May 7, 2014
Showing with 1 addition and 2 deletions.
  1. +1 −2 asmrun/natdynlink.c
View
@@ -25,9 +25,8 @@
#include <string.h>
static void *getsym(void *handle, char *module, char *name){
- char *fullname = malloc(strlen(module) + strlen(name) + 5);
+ char *fullname = caml_strconcat(3, "caml", module, name);
void *sym;
- sprintf(fullname, "caml%s%s", module, name);
sym = caml_dlsym (handle, fullname);
/* printf("%s => %lx\n", fullname, (uintnat) sym); */
free(fullname);

0 comments on commit 4fde434

Please sign in to comment.