summaryrefslogtreecommitdiffstats
path: root/libkmime
diff options
context:
space:
mode:
Diffstat (limited to 'libkmime')
-rw-r--r--libkmime/boolflags.cpp2
-rw-r--r--libkmime/kmime_charfreq.cpp4
-rw-r--r--libkmime/kmime_codec_qp.cpp14
3 files changed, 10 insertions, 10 deletions
diff --git a/libkmime/boolflags.cpp b/libkmime/boolflags.cpp
index 981e4ecc5..ad3388e5a 100644
--- a/libkmime/boolflags.cpp
+++ b/libkmime/boolflags.cpp
@@ -51,7 +51,7 @@ bool BoolFlags::get(unsigned int i)
n=0;
}
else { //second byte
- p=(1 << i-8);
+ p=(1 << (i-8));
n=1;
}
diff --git a/libkmime/kmime_charfreq.cpp b/libkmime/kmime_charfreq.cpp
index a75d76853..93413b80c 100644
--- a/libkmime/kmime_charfreq.cpp
+++ b/libkmime/kmime_charfreq.cpp
@@ -84,9 +84,9 @@ void CharFreq::count( const char * it, size_t len ) {
default:
{
uchar c = *it;
- if ( c == '\t' || c >= ' ' && c <= '~' )
+ if ( (c == '\t') || ((c >= ' ') && (c <= '~')) )
++printable;
- else if ( c == 127 || c < ' ' )
+ else if ( (c == 127) || (c < ' ') )
++CTL;
else
++eightBit;
diff --git a/libkmime/kmime_codec_qp.cpp b/libkmime/kmime_codec_qp.cpp
index 7c579b6a1..149b01f2a 100644
--- a/libkmime/kmime_codec_qp.cpp
+++ b/libkmime/kmime_codec_qp.cpp
@@ -60,7 +60,7 @@ static inline uchar lowNibble( uchar ch ) {
static inline bool keep( uchar ch ) {
// no CTLs, except HT and not '?'
- return !( ch < ' ' && ch != '\t' || ch == '?' );
+ return !( ((ch < ' ') && (ch != '\t')) || (ch == '?') );
}
//
@@ -90,7 +90,7 @@ protected:
mFinished(false) {}
bool needsEncoding( uchar ch ) {
- return ( ch > '~' || ch < ' ' && ch != '\t' || ch == '=' );
+ return ( (ch > '~') || ((ch < ' ') && (ch != '\t')) || (ch == '=') );
}
bool needsEncodingAtEOL( uchar ch ) {
return ( ch == ' ' || ch == '\t' );
@@ -273,8 +273,8 @@ bool QuotedPrintableDecoder::decode( const char* & scursor, const char * const s
// output mBadChar
assert( mAccu == 0 );
if ( mBadChar ) {
- if ( mBadChar >= '>' && mBadChar <= '~' ||
- mBadChar >= '!' && mBadChar <= '<' )
+ if ( ((mBadChar >= '>') && (mBadChar <= '~')) ||
+ ((mBadChar >= '!') && (mBadChar <= '<')) )
*dcursor++ = mBadChar;
mBadChar = 0;
}
@@ -355,7 +355,7 @@ bool QuotedPrintableDecoder::decode( const char* & scursor, const char * const s
mAccu = value << 4;
}
} else { // not mInsideHexChar
- if ( ch <= '~' && ch >= ' ' || ch == '\t' ) {
+ if ( ((ch <= '~') && (ch >= ' ')) || (ch == '\t') ) {
if ( ch == mEscapeChar ) {
mInsideHexChar = true;
} else if ( mTQEncoding && ch == '_' ) {
@@ -481,8 +481,8 @@ void QuotedPrintableEncoder::createOutputBuffer( char* & dcursor,
mCurrentLineLength = 0;
}
- if ( Never == mAccuNeedsEncoding ||
- AtBOL == mAccuNeedsEncoding && mCurrentLineLength != 0 ) {
+ if ( (Never == mAccuNeedsEncoding) ||
+ ((AtBOL == mAccuNeedsEncoding) && (mCurrentLineLength != 0)) ) {
write( mAccu, dcursor, dend );
mCurrentLineLength++;
} else {