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

smcv pushed a commit to annotated tag 1.5a
in repository iortcw.

commit a53cc805c664cfb70e604f8da189c1e0d8f912ab
Author: MAN-AT-ARMS <m4n4t4...@gmail.com>
Date:   Mon Sep 12 17:13:04 2016 -0400

    All: Remove dead code (which had undefined behaviour)
---
 MP/code/qcommon/msg.c | 22 ----------------------
 SP/code/qcommon/msg.c | 22 ----------------------
 2 files changed, 44 deletions(-)

diff --git a/MP/code/qcommon/msg.c b/MP/code/qcommon/msg.c
index 6700573..56ef5fc 100644
--- a/MP/code/qcommon/msg.c
+++ b/MP/code/qcommon/msg.c
@@ -106,12 +106,9 @@ bit functions
 =============================================================================
 */
 
-int overflows;
-
 // negative bit values include signs
 void MSG_WriteBits( msg_t *msg, int value, int bits ) {
        int i;
-//     FILE*   fp;
 
        oldsize += bits;
 
@@ -127,22 +124,6 @@ void MSG_WriteBits( msg_t *msg, int value, int bits ) {
                Com_Error( ERR_DROP, "MSG_WriteBits: bad bits %i", bits );
        }
 
-       // check for overflows
-       if ( bits != 32 ) {
-               if ( bits > 0 ) {
-                       if ( value > ( ( 1 << bits ) - 1 ) || value < 0 ) {
-                               overflows++;
-                       }
-               } else {
-                       int r;
-
-                       r = 1 << ( bits - 1 );
-
-                       if ( value >  r - 1 || value < -r ) {
-                               overflows++;
-                       }
-               }
-       }
        if ( bits < 0 ) {
                bits = -bits;
        }
@@ -165,7 +146,6 @@ void MSG_WriteBits( msg_t *msg, int value, int bits ) {
                        Com_Error( ERR_DROP, "can't read %d bits", bits );
                }
        } else {
-//             fp = fopen("c:\\netchan.bin", "a");
                value &= ( 0xffffffff >> ( 32 - bits ) );
                if ( bits & 7 ) {
                        int nbits;
@@ -178,13 +158,11 @@ void MSG_WriteBits( msg_t *msg, int value, int bits ) {
                }
                if ( bits ) {
                        for ( i = 0; i < bits; i += 8 ) {
-//                             fwrite(bp, 1, 1, fp);
                                Huff_offsetTransmit( &msgHuff.compressor, ( 
value & 0xff ), msg->data, &msg->bit );
                                value = ( value >> 8 );
                        }
                }
                msg->cursize = ( msg->bit >> 3 ) + 1;
-//             fclose(fp);
        }
 }
 
diff --git a/SP/code/qcommon/msg.c b/SP/code/qcommon/msg.c
index 088e406..350cfd0 100644
--- a/SP/code/qcommon/msg.c
+++ b/SP/code/qcommon/msg.c
@@ -105,12 +105,9 @@ bit functions
 =============================================================================
 */
 
-int overflows;
-
 // negative bit values include signs
 void MSG_WriteBits( msg_t *msg, int value, int bits ) {
        int i;
-//     FILE*   fp;
 
        oldsize += bits;
 
@@ -124,22 +121,6 @@ void MSG_WriteBits( msg_t *msg, int value, int bits ) {
                Com_Error( ERR_DROP, "MSG_WriteBits: bad bits %i", bits );
        }
 
-       // check for overflows
-       if ( bits != 32 ) {
-               if ( bits > 0 ) {
-                       if ( value > ( ( 1 << bits ) - 1 ) || value < 0 ) {
-                               overflows++;
-                       }
-               } else {
-                       int r;
-
-                       r = 1 << ( bits - 1 );
-
-                       if ( value >  r - 1 || value < -r ) {
-                               overflows++;
-                       }
-               }
-       }
        if ( bits < 0 ) {
                bits = -bits;
        }
@@ -162,7 +143,6 @@ void MSG_WriteBits( msg_t *msg, int value, int bits ) {
                        Com_Error( ERR_DROP, "can't read %d bits", bits );
                }
        } else {
-//             fp = fopen("c:\\netchan.bin", "a");
                value &= ( 0xffffffff >> ( 32 - bits ) );
                if ( bits & 7 ) {
                        int nbits;
@@ -175,13 +155,11 @@ void MSG_WriteBits( msg_t *msg, int value, int bits ) {
                }
                if ( bits ) {
                        for ( i = 0; i < bits; i += 8 ) {
-//                             fwrite(bp, 1, 1, fp);
                                Huff_offsetTransmit( &msgHuff.compressor, ( 
value & 0xff ), msg->data, &msg->bit );
                                value = ( value >> 8 );
                        }
                }
                msg->cursize = ( msg->bit >> 3 ) + 1;
-//             fclose(fp);
        }
 }
 

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

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to