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

Diff for /src/usr.bin/wall/wall.c between version 1.9 and 1.10

version 1.9, 1998/11/19 03:09:16 version 1.10, 1998/12/16 01:20:14
Line 185 
Line 185 
         time_t now, time();          time_t now, time();
         FILE *fp;          FILE *fp;
         int fd;          int fd;
         char *p, *whom, hostname[MAXHOSTNAMELEN], lbuf[100], tmpname[15];          char *p, *whom, hostname[MAXHOSTNAMELEN], lbuf[100], tmpname[64];
         char tmpbuf[5];          char tmpbuf[5];
   
         (void)strcpy(tmpname, _PATH_TMP);          snprintf(tmpname, sizeof(tmpname), "%s/wall.XXXXXX", _PATH_TMP);
         (void)strcat(tmpname, "wall.XXXXXX");  
         if (!(fd = mkstemp(tmpname)) || !(fp = fdopen(fd, "r+")))          if (!(fd = mkstemp(tmpname)) || !(fp = fdopen(fd, "r+")))
                 errx(1, "can't open temporary file.\n");                  errx(1, "can't open temporary file.\n");
         (void)unlink(tmpname);          (void)unlink(tmpname);

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10