[BACK]Return to sendbug.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / sendbug

Diff for /src/usr.bin/sendbug/sendbug.c between version 1.1 and 1.2

version 1.1, 2007/03/23 01:47:11 version 1.2, 2007/03/23 02:11:00
Line 40 
Line 40 
 int  int
 main(int argc, char *argv[])  main(int argc, char *argv[])
 {  {
         struct stat sb;  
         FILE *fp;  
         const char *editor, *tmpdir;          const char *editor, *tmpdir;
         char *tmppath = NULL;          char *tmppath = NULL;
         time_t mtime;  
         int c, fd, ret = 1;          int c, fd, ret = 1;
           struct stat sb;
           time_t mtime;
           FILE *fp;
   
         if ((tmpdir = getenv("TMPDIR")) == NULL || tmpdir[0] == '\0')          if ((tmpdir = getenv("TMPDIR")) == NULL || tmpdir[0] == '\0')
                 tmpdir = _PATH_TMP;                  tmpdir = _PATH_TMP;
Line 79 
Line 79 
                 warn("fork");                  warn("fork");
                 goto cleanup;                  goto cleanup;
         case 0:          case 0:
                 execlp(editor, editor, tmppath, NULL);                  execlp(editor, editor, tmppath, (void *)NULL);
                 err(1, "execlp");                  err(1, "execlp");
         default:          default:
                 wait(NULL);                  wait(NULL);
Line 161 
Line 161 
                 }                  }
                 close(filedes[0]);                  close(filedes[0]);
                 execl("/usr/sbin/sendmail", "sendmail",                  execl("/usr/sbin/sendmail", "sendmail",
                     "-oi", "-t", NULL);                      "-oi", "-t", (void *)NULL);
                 warn("sendmail error: unsent report in %s",                  warn("sendmail error: unsent report in %s",
                     tmppath);                      tmppath);
                 return (-1);                  return (-1);
Line 230 
Line 230 
 int  int
 send_file(const char *file, int dst)  send_file(const char *file, int dst)
 {  {
         FILE *fp;  
         char *buf;  
         size_t len;  
         int blank = 0;          int blank = 0;
           size_t len;
           char *buf;
           FILE *fp;
   
         if ((fp = fopen(file, "r")) == NULL)          if ((fp = fopen(file, "r")) == NULL)
                 return (-1);                  return (-1);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2