2005-02-15 [colin] 1.0.1cvs7
authorColin Leroy <colin@colino.net>
Tue, 15 Feb 2005 07:39:02 +0000 (07:39 +0000)
committerColin Leroy <colin@colino.net>
Tue, 15 Feb 2005 07:39:02 +0000 (07:39 +0000)
        * src/compose.c
        * src/procmime.c
                Optimize (constant instead of strlen). Thanks
Alfons for the hint.

ChangeLog.claws
PATCHSETS
configure.ac
src/compose.c
src/procmime.c

index 073a6eb27a9604acc97dbec499ddb65327260dfd..1d16067ed276ba7894dd3a51cc70c16bc8471aba 100644 (file)
@@ -1,3 +1,10 @@
+2005-02-15 [colin]     1.0.1cvs7
+
+       * src/compose.c
+       * src/procmime.c
+               Optimize (constant instead of strlen). Thanks
+               Alfons for the hint.
+
 2005-02-14 [colin]     1.0.1cvs6
 
        * src/compose.c
index bc3f5c4a7355eb11523f9f6c188c8a5d7a054661..cb241e8f14a2f1d220bb336e4bb022815be968b9 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.473 -r 1.474 src/compose.c; ) > 1.0.1cvs4.patchset
 ( cvs diff -u -r 1.71 -r 1.72 src/filtering.c; ) > 1.0.1cvs5.patchset
 ( cvs diff -u -r 1.474 -r 1.475 src/compose.c; cvs diff -u -r 1.103 -r 1.104 src/procmime.c; ) > 1.0.1cvs6.patchset
+( cvs diff -u -r 1.475 -r 1.476 src/compose.c; cvs diff -u -r 1.104 -r 1.105 src/procmime.c; ) > 1.0.1cvs7.patchset
index e2326f2959f83547c42cef06e4ae397a29125b25..b83818c09344bdf3d09d2380e3fd6dbbadb9b8d0 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=6
+EXTRA_VERSION=7
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index 4c7a3cf68cc9df473d378aa27dc40b8474eaee99..b894d6527c0e73098d51643b700931af4e839db9 100644 (file)
@@ -3457,7 +3457,7 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action)
        g_free(chars);
 
        if (encoding == ENC_8BIT || encoding == ENC_7BIT) {
-               if (!strncmp(buf, "From ", strlen("From ")) ||
+               if (!strncmp(buf, "From ", sizeof("From ")-1) ||
                    strstr(buf, "\nFrom ") != NULL) {
                        encoding = ENC_QUOTED_PRINTABLE;
                }
index 0ed8a07751af067dc7a079011a78b0e21f062e5d..60cf8222544f387b4987393f7fc2e46f85570474 100644 (file)
@@ -481,10 +481,10 @@ gboolean procmime_encode_content(MimeInfo *mimeinfo, EncodingType encoding)
                while (fgets(inbuf, sizeof(inbuf), infp) != NULL) {
                        qp_encode_line(outbuf, inbuf);
 
-                       if (!strncmp("From ", outbuf, strlen("From "))) {
+                       if (!strncmp("From ", outbuf, sizeof("From ")-1)) {
                                gchar *tmpbuf = outbuf;
                                
-                               tmpbuf += strlen("From ");
+                               tmpbuf += sizeof("From ")-1;
                                
                                fputs("=46rom ", outfp);
                                fputs(tmpbuf, outfp);