Here is a patch to fix a problem with notification parameters.  Fix is:

Remove premature return statements from fNotificationParameters.

The real problem is that the original code is inconsistent about putting a break in all cases of the switch blocks and some were falling through to the default case where there was a return. I took the simple route and removed the unnecessary returns - they were OK for default case but not for the fall through.

Is there a standard about having breaks? If it is desired to have a consistent coding style I will further update the code to conform. Otherwise, could someone please commit this change as it does fix the bug?

Thanks,

Dave Richards

Index: packet-bacapp.c
===================================================================
--- packet-bacapp.c     (revision 19789)
+++ packet-bacapp.c     (working copy)
@@ -3021,7 +3021,6 @@
                                        "status-flags: ", BACnetStatusFlags);
                                break;
                        default:
-                               return offset;
                                break;
                        }
                }
@@ -3185,7 +3184,6 @@
                                offset = fEnumeratedTagSplit (tvb, subtree, 
offset,
                                        "operation-expected: ", 
BACnetLifeSafetyOperation, 64);
                        default:
-                               return offset;
                                break;
                        }
                }
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@wireshark.org
http://www.wireshark.org/mailman/listinfo/wireshark-dev

Reply via email to