fix a segfault introduced by some nasty const /o\
[apps/madmutt.git] / send.c
diff --git a/send.c b/send.c
index bea5faa..32370e3 100644 (file)
--- a/send.c
+++ b/send.c
@@ -178,7 +178,7 @@ static ADDRESS *find_mailing_lists (ADDRESS * t, ADDRESS * c)
   return top;
 }
 
-static int edit_address (ADDRESS ** a, /* const */ char *field)
+static int edit_address (ADDRESS ** a, const char *field)
 {
   char buf[HUGE_STRING];
   char *err = NULL;
@@ -1076,7 +1076,7 @@ static void fix_end_of_file (const char *data)
 
   if ((fp = safe_fopen (data, "a+")) == NULL)
     return;
-  fseek (fp, -1, SEEK_END);
+  fseeko (fp, -1, SEEK_END);
   if ((c = fgetc (fp)) != '\n')
     fputc ('\n', fp);
   safe_fclose (&fp);
@@ -1111,8 +1111,8 @@ int ci_send_message (int flags, /* send mode */
   char *pgpkeylist = NULL;
 
   /* save current value of "pgp_sign_as" */
-  char *signas = NULL;
-  char *tag = NULL, *err = NULL;
+  char *signas = NULL, *err = NULL;
+  const char *tag = NULL;
   char *ctype;
 
   int rv = -1;