[pkg-opensc-commit] [libp11] 17/239: fix compiling libpkcs11.c file.

Eric Dorland eric at moszumanska.debian.org
Sat Oct 17 06:21:03 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libp11.

commit a7ba18c4abecb76956c58fa5c6df89e9f15821ad
Author: Andreas Jellinghaus <andreas at ionisiert.de>
Date:   Sun Aug 28 20:55:47 2005 +0000

    fix compiling libpkcs11.c file.
---
 src/libpkcs11.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/libpkcs11.c b/src/libpkcs11.c
index 598d4d0..0d975c1 100644
--- a/src/libpkcs11.c
+++ b/src/libpkcs11.c
@@ -23,11 +23,11 @@
  * Copyright (C) 2002  Olaf Kirch <okir at lst.de>
  */
 
-#include "pkcs11.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <ltdl.h>
+#include "cryptoki.h"
 
 #define MAGIC			0xd00bed00
 
@@ -48,14 +48,15 @@ C_LoadModule(const char *mspec, CK_FUNCTION_LIST_PTR_PTR funcs)
 	CK_RV (*c_get_function_list)(CK_FUNCTION_LIST_PTR_PTR);
 	int rv;
 
+	if (mspec == NULL)
+		return NULL;
+
 	if (lt_dlinit() != 0)
 		return NULL;
 
 	mod = (sc_pkcs11_module_t *) calloc(1, sizeof(*mod));
 	mod->_magic = MAGIC;
 
-	if (mspec == NULL)
-		mspec = PKCS11_DEFAULT_MODULE_NAME;
 	mod->handle = lt_dlopen(mspec);
 	if (mod->handle == NULL)
 		goto failed;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list