summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2003-03-20 22:14:45 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2003-03-20 22:14:45 +0000
commit857d0512d7cfcebcae88dbcd9019ffcf7c21e02e (patch)
tree93c74307bc751d26b16d7cad9e5a7a7104dba666
parentac7817bf9e7bce89ec117343eaa8bbf8d3086f3c (diff)
downloadATCD-857d0512d7cfcebcae88dbcd9019ffcf7c21e02e.tar.gz
ChangeLogTag:Thu Mar 20 14:11:01 2003 Ossama Othman <ossama@uci.edu>
-rw-r--r--ChangeLog8
-rw-r--r--ace/Codecs.cpp16
2 files changed, 15 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c73c7dffc0..1946bef580e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Thu Mar 20 14:11:01 2003 Ossama Othman <ossama@uci.edu>
+
+ * ace/Codecs.cpp (encode, decode):
+
+ Fixed "comparison is always false due to limited range of data
+ type" warning by removing those comparisons and accompanying
+ code.
+
Thu Mar 20 14:00:53 2003 Ossama Othman <ossama@uci.edu>
* ace/Memory_Pool.cpp (find_seg):
diff --git a/ace/Codecs.cpp b/ace/Codecs.cpp
index 39457567769..8d0aad7555d 100644
--- a/ace/Codecs.cpp
+++ b/ace/Codecs.cpp
@@ -1,10 +1,13 @@
-// $Id$
-
#include "ace/OS.h"
#include "ace/Codecs.h"
#include "ace/Log_Msg.h"
-const ACE_Byte ACE_Base64::alphabet_[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ACE_RCSID (ace,
+ Codecs,
+ "$Id$")
+
+const ACE_Byte ACE_Base64::alphabet_[] =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
const ACE_Byte ACE_Base64::pad_ = '=';
@@ -41,11 +44,6 @@ ACE_Base64::encode (const ACE_Byte* input,
for (size_t i = 0; i < input_len; ++i)
{
- if (input[i] > 255) {
- delete[] result;
- return 0;
- }
-
bits += input[i];
char_count++;
@@ -137,7 +135,7 @@ ACE_Base64::decode (const ACE_Byte* input, size_t* output_len)
{
if (input[i] == pad_)
break;
- if (input[i] > 255 || !ACE_Base64::member_[input[i]])
+ if (!ACE_Base64::member_[input[i]])
continue;
bits += decoder_[input[i]];
char_count++;