From 511072f2069a1e1645ef6643115f798d15ef854c Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 19 Feb 2012 14:57:25 +0100 Subject: [PATCH] protocol module: minor clean-up --- src/Network/generic.cxx | 5 ++++- src/Network/generic.hxx | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Network/generic.cxx b/src/Network/generic.cxx index 930a07084..c9c470e65 100644 --- a/src/Network/generic.cxx +++ b/src/Network/generic.cxx @@ -1,4 +1,4 @@ -// generic.cxx -- generic protocal class +// generic.cxx -- generic protocol class // // Written by Curtis Olson, started November 1999. // @@ -175,6 +175,7 @@ bool FGGeneric::gen_message_binary() { /* FIXME padding for alignment? Something like: * length += (strlength % 4 > 0 ? sizeof(int32_t) - strlength % 4 : 0; */ + break; } } @@ -329,6 +330,7 @@ bool FGGeneric::parse_message_binary(int length) { default: // SG_STRING SG_LOG( SG_IO, SG_ALERT, "Generic protocol: " "Ignoring unsupported binary input chunk type."); + break; } } @@ -377,6 +379,7 @@ bool FGGeneric::parse_message_ascii(int length) { default: // SG_STRING _in_message[i].prop->setStringValue(p1); + break; } p1 = p2; diff --git a/src/Network/generic.hxx b/src/Network/generic.hxx index 55f0ca8a5..627f3ef60 100644 --- a/src/Network/generic.hxx +++ b/src/Network/generic.hxx @@ -113,7 +113,7 @@ private: if( prot.max > prot.min ) { if( prot.wrap ) - new_val = SGMisc::normalizePeriodic(prot.min, prot.max, new_val); + new_val = SGMisc::normalizePeriodic(prot.min, prot.max, new_val); else new_val = SGMisc::clip(new_val, prot.min, prot.max); }