[gmime] Minor soptimization



commit dcc543bd89761d32e5ea07192365bcb45a13f06e
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Fri Oct 16 22:13:32 2009 -0400

    Minor soptimization

 TODO                      |    2 +-
 gmime/gmime-gpg-context.c |    2 +-
 gmime/gmime-parser.c      |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/TODO b/TODO
index 55a838c..3325f8f 100644
--- a/TODO
+++ b/TODO
@@ -36,7 +36,7 @@ GMime 2.6 Planning:
 
   This might be a better name for the enum to reflect what it's
   actually meant for. Maybe also move it from gmime-filter-best.h to
-  gmime-encodings.h?
+  gmime-encodings.h? [ DONE ]
 
 - How about a g_mime_part_get_best_charset()? This one could be
   awkward since it depends on the content being text and also encoded
diff --git a/gmime/gmime-gpg-context.c b/gmime/gmime-gpg-context.c
index 3447cb0..de3bafd 100644
--- a/gmime/gmime-gpg-context.c
+++ b/gmime/gmime-gpg-context.c
@@ -1213,7 +1213,7 @@ nearest_pow (size_t num)
 static inline size_t
 next_alloc_size (size_t n)
 {
-	return ((n + 63) / 64) * 64;
+	return (n + 63) & ~63;
 }
 #endif
 
diff --git a/gmime/gmime-parser.c b/gmime/gmime-parser.c
index f196ca1..afd9a62 100644
--- a/gmime/gmime-parser.c
+++ b/gmime/gmime-parser.c
@@ -864,7 +864,7 @@ nearest_pow (size_t num)
 static inline size_t
 next_alloc_size (size_t n)
 {
-	return ((n + 63) / 64) * 64;
+	return (n + 63) & ~63;
 }
 #endif
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]