mapi32: Write-strings warnings fix

Andrew Talbot Andrew.Talbot at talbotville.com
Sat Jun 3 15:33:58 CDT 2006


I apologise for my inattention on this patch. I trust it is now correct.

-- Andy.
---

Changelog:
    Re: mapi32: Write-strings warnings fix.

diff -urN a/dlls/mapi32/sendmail.c b/dlls/mapi32/sendmail.c
--- a/dlls/mapi32/sendmail.c    2006-05-23 17:24:40.000000000 +0100
+++ b/dlls/mapi32/sendmail.c    2006-06-03 21:12:44.000000000 +0100
@@ -64,6 +64,7 @@
     unsigned int to_size = 0, cc_size = 0, bcc_size = 0, subj_size,
body_size;
 
     char *address = "", *to = NULL, *cc = NULL, *bcc = NULL, *subject,
*body;
+    static CHAR empty[] = "";
     static const char format[] =
         "mailto:\"%s\"?subject=\"%s\"&cc=\"%s\"&bcc=\"%s\"&body=\"%s\"";
     char *mailto = NULL, *escape = NULL;
@@ -113,8 +114,8 @@
     }
     if (message->nFileCount) FIXME("Ignoring attachments\n");
 
-    subject = message->lpszSubject ? message->lpszSubject : "";
-    body = message->lpszNoteText ? message->lpszNoteText : "";
+    subject = message->lpszSubject ? message->lpszSubject : empty;
+    body = message->lpszNoteText ? message->lpszNoteText : empty;
 
     TRACE( "Subject: %s\n", debugstr_a(subject) );
     TRACE( "Body: %s\n", debugstr_a(body) );





More information about the wine-patches mailing list