dtcm: Also make sure to reset non pointer fields, so that on future failures they...
authorPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 17:22:53 +0000 (18:22 +0100)
committerPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 17:22:53 +0000 (18:22 +0100)
cde/programs/dtcm/server/rtable2.c
cde/programs/dtcm/server/rtable3.c

index ac34290a98cef965269c7d34e8964602e2b13d74..eb3e02b665018622c059797456054ced0a95e2d0 100644 (file)
@@ -301,7 +301,9 @@ _DtCm_rtable_check_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
         static Table_Status_2 res; 
         Table_Args_4 *newargs;     
         Table_Status_4 *newres;    
-       
+
+        res = 0;
+
         newargs = _DtCm_tableargs2_to_tableargs4(args);
         if(newargs) {
                 newres = _DtCm_rtable_check_4_svc(newargs, svcrq);
@@ -321,7 +323,9 @@ _DtCm_rtable_flush_table_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
         static Table_Status_2 res;  
         Table_Args_4 *newargs;     
         Table_Status_4 *newres;     
-        
+
+        res = 0;
+
         newargs = _DtCm_tableargs2_to_tableargs4(args);     
         newres = _DtCm_rtable_flush_table_4_svc(newargs, svcrq);     
                
@@ -338,7 +342,9 @@ _DtCm_rtable_size_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
 {
         static int size;   
         Table_Args_4 *newargs;      
-         
+
+        size = 0;
+
         newargs = _DtCm_tableargs2_to_tableargs4(args);
         if(newargs) {
                 size = (*(_DtCm_rtable_size_4_svc(newargs, svcrq)));
@@ -357,6 +363,8 @@ _DtCm_register_callback_2_svc(Registration_2 *r, struct svc_req *svcrq)
         Registration_4 *newreg;       
        Registration_Status_4 *newstat;
 
+        stat = 0;
+
         newreg = _DtCm_reg2_to_reg4(r);
         if(newreg) {
                 newstat = _DtCm_register_callback_4_svc(newreg, svcrq);
@@ -374,7 +382,9 @@ _DtCm_deregister_callback_2_svc(Registration_2 *r, struct svc_req *svcrq)
         static Registration_Status_2 stat;     
         Registration_4 *newreg;          
         Registration_Status_4 *newstat; 
-           
+
+        stat = 0;
+
         newreg = _DtCm_reg2_to_reg4(r);       
         if(newreg) {
                 newstat = _DtCm_deregister_callback_4_svc(newreg, svcrq);
@@ -393,7 +403,9 @@ _DtCm_rtable_set_access_2_svc(Access_Args_2 *args, struct svc_req *svcrq)
        static Access_Status_2 stat;
        Access_Args_4 *newargs;
        Access_Status_4 *newstat;
-        
+
+        stat = 0;
+
         newargs = _DtCm_accargs2_to_accargs4(args);     
         if(newargs) {
                 newstat = _DtCm_rtable_set_access_4_svc(newargs, svcrq);
index 41b96ec93fbb61117ae937e07589e9e413f28878..44fe379922fe568887715b8934993e35c3933b8b 100644 (file)
@@ -274,6 +274,8 @@ _DtCm_rtable_check_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
         Table_Args_4 *newargs;     
         Table_Status_4 *newres;    
 
+        res = 0;
+
         newargs = _DtCm_tableargs3_to_tableargs4(args);    
         newres = _DtCm_rtable_check_4_svc(newargs, svcrq);    
         res = _DtCm_tablestat4_to_tablestat3(*newres);   
@@ -291,6 +293,8 @@ _DtCm_rtable_flush_table_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
         Table_Args_4 *newargs;     
         Table_Status_4 *newres;     
 
+        res = 0;
+
         newargs = _DtCm_tableargs3_to_tableargs4(args);     
         newres = _DtCm_rtable_flush_table_4_svc(newargs, svcrq);     
         res = _DtCm_tablestat4_to_tablestat3(*newres);    
@@ -307,6 +311,8 @@ _DtCm_rtable_size_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
         static int size;   
         Table_Args_4 *newargs;      
 
+        size = 0;
+
         newargs = _DtCm_tableargs3_to_tableargs4(args);     
         size = (*(_DtCm_rtable_size_4_svc(newargs, svcrq)));      
 
@@ -323,6 +329,8 @@ _DtCm_register_callback_3_svc(Registration_3 *r, struct svc_req *svcrq)
         Registration_4 *newreg;       
        Registration_Status_4 *newstat;
 
+        stat = 0;
+
         newreg = _DtCm_reg3_to_reg4(r);      
         newstat = _DtCm_register_callback_4_svc(newreg, svcrq);      
         stat = _DtCm_regstat4_to_regstat3(*newstat);      
@@ -339,6 +347,8 @@ _DtCm_deregister_callback_3_svc(Registration_3 *r, struct svc_req *svcrq)
         Registration_4 *newreg;          
         Registration_Status_4 *newstat; 
 
+        stat = 0;
+
         newreg = _DtCm_reg3_to_reg4(r);       
         newstat = _DtCm_deregister_callback_4_svc(newreg, svcrq);       
         stat = _DtCm_regstat4_to_regstat3(*newstat);       
@@ -355,6 +365,8 @@ _DtCm_rtable_set_access_3_svc(Access_Args_3 *args, struct svc_req *svcrq)
        Access_Args_4 *newargs;
        Access_Status_4 *newstat;
 
+        stat = 0;
+
         newargs = _DtCm_accargs3_to_accargs4(args);     
         newstat = _DtCm_rtable_set_access_4_svc(newargs, svcrq);     
         stat = _DtCm_accstat4_to_accstat3(*newstat);