Most of the previous warnings were harmless, but pkcsconf was calling
catgets() with a broken parameter (string instead of number).
---
 usr/sbin/pkcsconf/pkcsconf.c       |    2 +-
 usr/sbin/pkcsslotd/garbage_linux.c |    2 +-
 usr/sbin/pkcsslotd/no_odm.c        |   18 +++++++++---------
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/usr/sbin/pkcsconf/pkcsconf.c b/usr/sbin/pkcsconf/pkcsconf.c
index dad8ccb..2f07c13 100644
--- a/usr/sbin/pkcsconf/pkcsconf.c
+++ b/usr/sbin/pkcsconf/pkcsconf.c
@@ -783,7 +783,7 @@ display_pkcs11_info(void){
 
    /* display the header and information */
    printf(PKCSINIT_MSG(PKCSINFO, "PKCS#11 Info\n"));
-   printf(PKCSINIT_MSG(VERSION, "\tVersion %d.%d \n"), 
CryptokiInfo.cryptokiVersion.major,
+   printf(PKCSINIT_MSG(VVERSION, "\tVersion %d.%d \n"), 
CryptokiInfo.cryptokiVersion.major,
          CryptokiInfo.cryptokiVersion.minor);
    printf(PKCSINIT_MSG(MANUFACT, "\tManufacturer: %32s \n"), 
CryptokiInfo.manufacturerID);
    printf(PKCSINIT_MSG(FLAGS, "\tFlags: 0x%X  \n"), CryptokiInfo.flags);
diff --git a/usr/sbin/pkcsslotd/garbage_linux.c 
b/usr/sbin/pkcsslotd/garbage_linux.c
index c3be39c..cc6d4a6 100644
--- a/usr/sbin/pkcsslotd/garbage_linux.c
+++ b/usr/sbin/pkcsslotd/garbage_linux.c
@@ -743,7 +743,7 @@ int Stat2Proc (int pid, proc_t *p) {
   // buf[num] = '\0';
   
   tmp = strrchr(buf, ')');                      // split into "PID (cmd" and 
"<rest>"
-  *tmp = (char)NULL;                            // replacing trailing ')' with 
NULL
+  *tmp = '\0';                                  // replacing trailing ')' with 
NULL
   // Tmp now points to the rest of the buffer.
   // buff points to the command...
   
diff --git a/usr/sbin/pkcsslotd/no_odm.c b/usr/sbin/pkcsslotd/no_odm.c
index c30c316..caef3b1 100644
--- a/usr/sbin/pkcsslotd/no_odm.c
+++ b/usr/sbin/pkcsslotd/no_odm.c
@@ -504,7 +504,7 @@ BOOL ReadSlotInfoDB ( void ) {
     fgets(slot_entry, PATH_MAX, fp);
     while( ( (slot_entry[0] == '#') ||
             (slot_entry[0] == '\n') || 
-            (slot_entry[0] == (char)NULL) ) 
+            (slot_entry[0] == '\0') )
           && (!feof(fp)) ) {
       // skipping all blank lines, and lines beginning with a #, at all times
       // AM I FORGETTING ANY OTHER CONDITIONS FOR BLANK LINES ??
@@ -575,7 +575,7 @@ BOOL ReadSlotInfoDB ( void ) {
          : (strlen(slot_element) ) ) );
 
       /* Set the last character in string to NULL since strncpy may mor may 
not copy the trailing NULL */
-      pSlot->slotDescription[sizeof(pSlot->slotDescription) - 1] = 
(CK_CHAR)NULL;
+      pSlot->slotDescription[sizeof(pSlot->slotDescription) - 1] = '\0';
 
       element_num++;
       break;
@@ -590,7 +590,7 @@ BOOL ReadSlotInfoDB ( void ) {
          : (strlen(slot_element) ) ) );
 
       /* Set the last character in string to NULL since strncpy may mor may 
not copy the trailing NULL */
-      pSlot->manufacturerID[sizeof(pSlot->manufacturerID) - 1] = (CK_CHAR)NULL;
+      pSlot->manufacturerID[sizeof(pSlot->manufacturerID) - 1] = '\0';
 
       element_num++;
       break;
@@ -703,7 +703,7 @@ BOOL ReadSlotInfoDB ( void ) {
            : (strlen(slot_element)) ) );
       
       /* Set the last character in string to NULL since strncpy may mor may 
not copy the trailing NULL */
-      sinfo_struct.correlator[sizeof(sinfo_struct.correlator) - 1] = (char) 
NULL;
+      sinfo_struct.correlator[sizeof(sinfo_struct.correlator) - 1] = '\0';
       }
 
       element_num++;
@@ -715,7 +715,7 @@ BOOL ReadSlotInfoDB ( void ) {
 
     case DLLLocation:
       if(slot_element[0] == 0x0 /*NULL */) {   //finish later...
-        sinfo_struct.dll_location[0] = (char)NULL;
+        sinfo_struct.dll_location[0] = '\0';
       }
       else {
         strncpy( (sinfo_struct.dll_location), slot_element, 
@@ -724,7 +724,7 @@ BOOL ReadSlotInfoDB ( void ) {
                  : (strlen(slot_element)) ) ); // took away an ")"
 
         /* Set the last character in string to NULL since strncpy may mor may 
not copy the trailing NULL */
-        sinfo_struct.dll_location[sizeof(sinfo_struct.dll_location) - 1] = 
(char) NULL;
+        sinfo_struct.dll_location[sizeof(sinfo_struct.dll_location) - 1] = 
'\0';
       }
 
       element_num++;
@@ -736,7 +736,7 @@ BOOL ReadSlotInfoDB ( void ) {
 
     case SlotInitFcn:
       if(slot_element[0] == 0x0 /*NULL */) {     // finish later...
-       sinfo_struct.slot_init_fcn[0] = (char)NULL;
+       sinfo_struct.slot_init_fcn[0] = '\0';
     }
     else {
       // SAB  if there is not an initfcn then this entry is not used
@@ -748,14 +748,14 @@ BOOL ReadSlotInfoDB ( void ) {
          : strlen(slot_element)) );
 
       /* Set the last character in string to NULL since strncpy may mor may 
not copy the trailing NULL */
-      sinfo_struct.slot_init_fcn[sizeof(sinfo_struct.slot_init_fcn) - 1] 
=(char) NULL;
+      sinfo_struct.slot_init_fcn[sizeof(sinfo_struct.slot_init_fcn) - 1] = 
'\0';
 
       {
         /* stripping off trailing new line character, '\n' from init function 
name if necessary */
         unsigned int i;
         for(i = 0; i < sizeof(sinfo_struct.slot_init_fcn); i++){
           if(sinfo_struct.slot_init_fcn[i] == '\n')
-            sinfo_struct.slot_init_fcn[i] = (char)NULL;
+            sinfo_struct.slot_init_fcn[i] = '\0';
         }
       }
 
-- 
1.7.5.rc1


------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to