]> diplodocus.org Git - nmh/commitdiff
Replaced nearly all unlink(3) calls with m_unlink().
authorDavid Levine <levinedl@acm.org>
Sat, 25 Jan 2014 16:04:19 +0000 (10:04 -0600)
committerDavid Levine <levinedl@acm.org>
Sat, 25 Jan 2014 16:04:19 +0000 (10:04 -0600)
33 files changed:
sbr/folder_delmsgs.c
sbr/lock_file.c
sbr/m_backup.c
sbr/m_mktemp.c
sbr/seq_save.c
uip/annosbr.c
uip/attach.c
uip/distsbr.c
uip/dropsbr.c
uip/forwsbr.c
uip/inc.c
uip/mhbuild.c
uip/mhcachesbr.c
uip/mhfixmsg.c
uip/mhfree.c
uip/mhparse.c
uip/mhstoresbr.c
uip/mhtest.c
uip/msh.c
uip/mshcmds.c
uip/post.c
uip/prompter.c
uip/rcvdist.c
uip/rcvstore.c
uip/rcvtty.c
uip/refile.c
uip/rmf.c
uip/send.c
uip/sendsbr.c
uip/slocal.c
uip/viamail.c
uip/whatnowsbr.c
uip/whom.c

index ee4bd9e95e4b96d33b971578eda3918dd80363a3..db593f805134e20011863b86c3aa14193423d2af 100644 (file)
@@ -112,7 +112,7 @@ folder_delmsgs (struct msgs *mp, int unlink_msgs, int nohook)
 
            if (unlink_msgs) {
                /* just unlink the messages */
 
            if (unlink_msgs) {
                /* just unlink the messages */
-               if (unlink (dp) == -1) {
+               if (m_unlink (dp) == -1) {
                    admonish (dp, "unable to unlink");
                    retval = -1;
                    continue;
                    admonish (dp, "unable to unlink");
                    retval = -1;
                    continue;
index 6a3be51924a6d4167665602c2b59b7b9e00cdfbe..1a562f9b987d61333f7367bb50fd1aee851cbfa7 100644 (file)
@@ -335,7 +335,7 @@ lkclose_dot (int fd, const char *file)
 
     lockname (file, &lkinfo, 0);       /* get name of lock file */
 #if !defined(HAVE_LIBLOCKFILE)
 
     lockname (file, &lkinfo, 0);       /* get name of lock file */
 #if !defined(HAVE_LIBLOCKFILE)
-    unlink (lkinfo.curlock);           /* remove lock file      */
+    (void) m_unlink (lkinfo.curlock);  /* remove lock file      */
 #else
     lockfile_remove(lkinfo.curlock);
 #endif /* HAVE_LIBLOCKFILE */
 #else
     lockfile_remove(lkinfo.curlock);
 #endif /* HAVE_LIBLOCKFILE */
@@ -513,7 +513,7 @@ lkopen_dot (const char *file, int access, mode_t mode)
                    
                    /* check for stale lockfile, else sleep */
                    if (curtime > st.st_ctime + RSECS)
                    
                    /* check for stale lockfile, else sleep */
                    if (curtime > st.st_ctime + RSECS)
-                       unlink (lkinfo.curlock);
+                       (void) m_unlink (lkinfo.curlock);
                    else
                        sleep (5);
                }
                    else
                        sleep (5);
                }
@@ -569,7 +569,7 @@ lockit (struct lockinfo *li)
      * by linking to the temporary file.
      */
     fd = link(tmpfile, curlock);
      * by linking to the temporary file.
      */
     fd = link(tmpfile, curlock);
-    unlink(tmpfile);
+    (void) m_unlink(tmpfile);
 
     return (fd == -1 ? -1 : 0);
 }
 
     return (fd == -1 ? -1 : 0);
 }
index c34c40974343f1b92e0de5c685090d916f05fc38..5e24a0335327327ac58c85b8d378e93760f4b344 100644 (file)
@@ -23,6 +23,6 @@ m_backup (char *file)
        snprintf(buffer, sizeof(buffer), "%.*s%s%s", (int)(cp - file), file,
                BACKUP_PREFIX, cp);
 
        snprintf(buffer, sizeof(buffer), "%.*s%s%s", (int)(cp - file), file,
                BACKUP_PREFIX, cp);
 
-    unlink(buffer);
+    (void) m_unlink(buffer);
     return buffer;
 }
     return buffer;
 }
index cc9c45f521c347149588f6a2f393a4a7fb44f248..ac05306a96cb33b4c9c40ef947a3157ab0ed3700 100644 (file)
@@ -77,7 +77,7 @@ m_mktemp (
         FILE *fp = fdopen(fd, "w+");
         if (fp == NULL) {
             int olderr = errno;
         FILE *fp = fdopen(fd, "w+");
         if (fp == NULL) {
             int olderr = errno;
-            unlink(tmpfil);
+            (void) m_unlink(tmpfil);
             close(fd);
             errno = olderr;
             umask(oldmode);
             close(fd);
             errno = olderr;
             umask(oldmode);
index 83753afb5a1be551f068a06d9768b268b823ee4d..5b06dcdfe8019c73d7ea54e299b446906d487c26 100644 (file)
@@ -91,7 +91,7 @@ priv:
                    rewind(fp);
                    ftruncate(fileno(fp), 0);
                } else if ((fp = lkfopendata (seqfile, "w")) == NULL
                    rewind(fp);
                    ftruncate(fileno(fp), 0);
                } else if ((fp = lkfopendata (seqfile, "w")) == NULL
-                       && (unlink (seqfile) == -1 ||
+                       && (m_unlink (seqfile) == -1 ||
                            (fp = lkfopendata (seqfile, "w")) == NULL)) {
                    admonish (attr, "unable to write");
                    goto priv;
                            (fp = lkfopendata (seqfile, "w")) == NULL)) {
                    admonish (attr, "unable to write");
                    goto priv;
@@ -118,7 +118,7 @@ priv:
         * public sequences, then remove that file.
         */
        if (!is_readonly(mp))
         * public sequences, then remove that file.
         */
        if (!is_readonly(mp))
-           unlink (seqfile);
+           (void) m_unlink (seqfile);
     }
 
     /*
     }
 
     /*
index 2f40560b51e2c14b991030dfa698b8c5c7d80921..88c90f44eca8fc871381945280240d4dc4d127eb 100644 (file)
@@ -415,13 +415,13 @@ annosbr (int fd, char *file, char *comp, char *text, int inplace, int datesw, in
 
        cpydata (tmpfd, fd, tmpfil, file);
        close (tmpfd);
 
        cpydata (tmpfd, fd, tmpfil, file);
        close (tmpfd);
-       unlink (tmpfil);
+       (void) m_unlink (tmpfil);
     } else {
        strncpy (buffer, m_backup (file), sizeof(buffer));
        if (rename (file, buffer) == NOTOK) {
            switch (errno) {
                case ENOENT:    /* unlinked early - no annotations */
     } else {
        strncpy (buffer, m_backup (file), sizeof(buffer));
        if (rename (file, buffer) == NOTOK) {
            switch (errno) {
                case ENOENT:    /* unlinked early - no annotations */
-                   unlink (tmpfil);
+                   (void) m_unlink (tmpfil);
                    break;
 
                default:
                    break;
 
                default:
index 9ff7d0955598dbe73cc736173478f48c165fb8be..8be4ed2a517e8134d42ff46cc7086733c1e687c5 100644 (file)
@@ -105,7 +105,7 @@ attach(char *attachment_header_field_name, char *draft_file_name,
     }
     (void)strncpy(body_file_name, p, body_file_name_len);
     if ((p = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
     }
     (void)strncpy(body_file_name, p, body_file_name_len);
     if ((p = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
-        unlink(body_file_name);
+        (void) m_unlink(body_file_name);
        adios(NULL, "unable to create temporary file in %s", get_temp_dir());
     }
     (void)strncpy(composition_file_name, p, composition_file_name_len);
        adios(NULL, "unable to create temporary file in %s", get_temp_dir());
     }
     (void)strncpy(composition_file_name, p, composition_file_name_len);
@@ -237,8 +237,8 @@ void
 clean_up_temporary_files(const char *body_file_name,
                          const char *composition_file_name)
 {
 clean_up_temporary_files(const char *body_file_name,
                          const char *composition_file_name)
 {
-    (void) unlink(body_file_name);
-    (void) unlink(composition_file_name);
+    (void) m_unlink(body_file_name);
+    (void) m_unlink(composition_file_name);
 
     return;
 }
 
     return;
 }
index d371ec1dbf77d709eb332c18b1d849ae50be3172..2d9239e92fd4495f627ceaf1d2896fa23af9ef25 100644 (file)
@@ -87,7 +87,7 @@ distout (char *drft, char *msgnam, char *backup)
        leave_bad: ;
                fclose (ifp);
                fclose (ofp);
        leave_bad: ;
                fclose (ifp);
                fclose (ofp);
-               unlink (drft);
+               (void) m_unlink (drft);
                if (rename (backup, drft) == NOTOK)
                    adios (drft, "unable to rename %s to", backup);
                return NOTOK;
                if (rename (backup, drft) == NOTOK)
                    adios (drft, "unable to rename %s to", backup);
                return NOTOK;
@@ -104,7 +104,7 @@ process: ;
     if (!resent) {
        advise (NULL, BADMSG, "draft");
        fclose (ofp);
     if (!resent) {
        advise (NULL, BADMSG, "draft");
        fclose (ofp);
-       unlink (drft);
+       (void) m_unlink (drft);
        if (rename (backup, drft) == NOTOK)
            adios (drft, "unable to rename %s to", backup);
        return NOTOK;
        if (rename (backup, drft) == NOTOK)
            adios (drft, "unable to rename %s to", backup);
        return NOTOK;
@@ -147,7 +147,7 @@ ready_msg (char *msgnam)
     if ((out = dup (hdrfd)) == NOTOK
            || (ofp = fdopen (out, "w")) == NULL)
        adios (NULL, "no file descriptors -- you lose big");
     if ((out = dup (hdrfd)) == NOTOK
            || (ofp = fdopen (out, "w")) == NULL)
        adios (NULL, "no file descriptors -- you lose big");
-    unlink (tmpfil);
+    (void) m_unlink (tmpfil);
 
     for (;;) {
        int buffersz = sizeof buffer;
 
     for (;;) {
        int buffersz = sizeof buffer;
@@ -177,7 +177,7 @@ ready_msg (char *msgnam)
                if ((out = dup (txtfd)) == NOTOK
                        || (ofp = fdopen (out, "w")) == NULL)
                    adios (NULL, "no file descriptors -- you lose big");
                if ((out = dup (txtfd)) == NOTOK
                        || (ofp = fdopen (out, "w")) == NULL)
                    adios (NULL, "no file descriptors -- you lose big");
-               unlink (tmpfil);
+               (void) m_unlink (tmpfil);
                fprintf (ofp, "\n%s", buffer);
                while (state == BODY) {
                    buffersz = sizeof buffer;
                fprintf (ofp, "\n%s", buffer);
                while (state == BODY) {
                    buffersz = sizeof buffer;
index 2cf5b598d6415d92c7053e49739f0bea0d0e6c38..da2752d12debfd1f0cb2eccde51815d4fc989812 100644 (file)
@@ -567,7 +567,7 @@ map_write (char *mailbox, int md, int id, long last, off_t start,
        clear = 1;
 
     if (!clear && map_chk (file, fd, &d1, pos, noisy)) {
        clear = 1;
 
     if (!clear && map_chk (file, fd, &d1, pos, noisy)) {
-       unlink (file);
+       (void) m_unlink (file);
        mbx_close (file, fd);
        if ((fd = map_open (file, md)) == NOTOK)
            return NOTOK;
        mbx_close (file, fd);
        if ((fd = map_open (file, md)) == NOTOK)
            return NOTOK;
index 90838e2418dffd06a803c78111067bc040ea2d96..295507d61482ee426f000f8c2b1166228593543d 100644 (file)
@@ -178,7 +178,7 @@ finished:
        adios(NULL, "unable to create temporary file in %s", get_temp_dir());
     }
     strncpy (tmpfil, cp, sizeof(tmpfil));
        adios(NULL, "unable to create temporary file in %s", get_temp_dir());
     }
     strncpy (tmpfil, cp, sizeof(tmpfil));
-    unlink (tmpfil);
+    (void) m_unlink (tmpfil);
     if ((in = dup (fileno (tmp))) == NOTOK)
        adios ("dup", "unable to");
 
     if ((in = dup (fileno (tmp))) == NOTOK)
        adios ("dup", "unable to");
 
index bf8216f4061f8122b9d5164ede9727afeac1a5c9..b76f1cd96d8d04bf33b646ba479b9559a6a9f287 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -656,7 +656,7 @@ go_to_it:
            } else {
                if (ferror(pf) || fclose (pf)) {
                    int e = errno;
            } else {
                if (ferror(pf) || fclose (pf)) {
                    int e = errno;
-                   unlink (cp);
+                   (void) m_unlink (cp);
                    pop_quit ();
                    errno = e;
                    adios (cp, "write error on");
                    pop_quit ();
                    errno = e;
                    adios (cp, "write error on");
@@ -751,7 +751,7 @@ go_to_it:
                        break;
                if (ferror(sf) || fflush(pf) || ferror(pf)) {
                        int e = errno;
                        break;
                if (ferror(sf) || fflush(pf) || ferror(pf)) {
                        int e = errno;
-                       fclose(pf); fclose(sf); unlink(cp);
+                       fclose(pf); fclose(sf); (void) m_unlink(cp);
                        errno = e;
                        adios(cp, "copy error %s -> %s", sp, cp);
                }
                        errno = e;
                        adios(cp, "copy error %s -> %s", sp, cp);
                }
@@ -798,14 +798,14 @@ go_to_it:
            }
            if (ferror(pf) || fclose (pf)) {
                int e = errno;
            }
            if (ferror(pf) || fclose (pf)) {
                int e = errno;
-               unlink (cp);
+               (void) m_unlink (cp);
                errno = e;
                adios (cp, "write error on");
            }
            pf = NULL;
            free (cp);
 
                errno = e;
                adios (cp, "write error on");
            }
            pf = NULL;
            free (cp);
 
-           if (trnflag && unlink (sp) == NOTOK)
+           if (trnflag && m_unlink (sp) == NOTOK)
                adios (sp, "couldn't unlink");
            free (sp); /* Free Maildir[i]->filename */
        }
                adios (sp, "couldn't unlink");
            free (sp); /* Free Maildir[i]->filename */
        }
@@ -847,7 +847,7 @@ go_to_it:
                    close (newfd);
                else
                    admonish (newmail, "error zero'ing");
                    close (newfd);
                else
                    admonish (newmail, "error zero'ing");
-               unlink(map_name(newmail));
+               (void) m_unlink(map_name(newmail));
            }
        } else {
            if (noisy)
            }
        } else {
            if (noisy)
index b0ef72ae4079d5f7c416128d763097b9351cac59..1a160711e29a8a42c86a30a87c945410e4898576 100644 (file)
@@ -341,7 +341,7 @@ main (int argc, char **argv)
            free_content (ct);
        }
 
            free_content (ct);
        }
 
-       unlink (infile);
+       (void) m_unlink (infile);
        unlink_infile = 0;
 
        done (0);
        unlink_infile = 0;
 
        done (0);
@@ -410,9 +410,9 @@ unlink_done (int status)
      * temporary files.
      */
     if (unlink_infile)
      * temporary files.
      */
     if (unlink_infile)
-       unlink (infile);
+       (void) m_unlink (infile);
     if (unlink_outfile)
     if (unlink_outfile)
-       unlink (outfile);
+       (void) m_unlink (outfile);
 
     exit (status);
 }
 
     exit (status);
 }
index 0bf725c686718fca40882a7bea70662f77a1e0bb..136b567807e6c9b84506b8dda4ba3982d57aa238 100644 (file)
@@ -143,11 +143,11 @@ cache_content (CT ct)
 
            if (ferror (gp)) {
                admonish (ce->ce_file, "error reading");
 
            if (ferror (gp)) {
                admonish (ce->ce_file, "error reading");
-               unlink (cachefile);
+               (void) m_unlink (cachefile);
            } else {
                if (ferror (fp)) {
                    admonish (cachefile, "error writing");
            } else {
                if (ferror (fp)) {
                    admonish (cachefile, "error writing");
-                   unlink (cachefile);
+                   (void) m_unlink (cachefile);
                }
            }
            fclose (fp);
                }
            }
            fclose (fp);
@@ -273,7 +273,7 @@ got_it:
     if (status == OK && writing) {
        if (*writing && strchr(buffer, '/'))
            make_intermediates (buffer);
     if (status == OK && writing) {
        if (*writing && strchr(buffer, '/'))
            make_intermediates (buffer);
-       unlink (buffer);
+       (void) m_unlink (buffer);
     }
 
     free (id);
     }
 
     free (id);
index a59ca5095c74078b2770abb2299d8df369fb72af..201625087d44427126a6117ebf7860948768fbe9 100644 (file)
@@ -293,7 +293,7 @@ main (int argc, char **argv) {
             }
 
             if (close (fd)) {
             }
 
             if (close (fd)) {
-                unlink (file);
+                (void) m_unlink (file);
                 adios (NULL, "failed to write temporary file");
             }
         }
                 adios (NULL, "failed to write temporary file");
             }
         }
@@ -356,7 +356,7 @@ main (int argc, char **argv) {
             status += mhfixmsgsbr (ctp, &fx, outfile);
 
             if (using_stdin) {
             status += mhfixmsgsbr (ctp, &fx, outfile);
 
             if (using_stdin) {
-                unlink (file);
+                (void) m_unlink (file);
 
                 if (! outfile) {
                     /* Just calling m_backup() unlinks the backup file. */
 
                 if (! outfile) {
                     /* Just calling m_backup() unlinks the backup file. */
@@ -457,7 +457,7 @@ mhfixmsgsbr (CT *ctp, const fix_transformations *fx, char *outfile) {
     }
 
     if (modify_inplace) {
     }
 
     if (modify_inplace) {
-        if (status != OK) unlink (outfile);
+        if (status != OK) (void) m_unlink (outfile);
         free (outfile);
         outfile = NULL;
     }
         free (outfile);
         outfile = NULL;
     }
@@ -1035,7 +1035,7 @@ build_text_plain_part (CT encoded_part) {
     }
 
     free_content (tp_part);
     }
 
     free_content (tp_part);
-    unlink (tmp_plain_file);
+    (void) m_unlink (tmp_plain_file);
     free (tmp_plain_file);
 
     return NULL;
     free (tmp_plain_file);
 
     return NULL;
@@ -1106,7 +1106,7 @@ decode_part (CT ct) {
        filename of the decoded content.  tmp_decoded will contain the
        encoded output, get rid of that. */
     status = output_message (ct, tmp_decoded);
        filename of the decoded content.  tmp_decoded will contain the
        encoded output, get rid of that. */
     status = output_message (ct, tmp_decoded);
-    unlink (tmp_decoded);
+    (void) m_unlink (tmp_decoded);
     free (tmp_decoded);
 
     return status;
     free (tmp_decoded);
 
     return status;
@@ -1166,7 +1166,7 @@ reformat_part (CT ct, char *file, char *type, char *subtype, int c_type) {
     /* Unlink decoded content tmp file and free its filename to avoid
        leaks.  The file stream should already have been closed. */
     if (ct->c_cefile.ce_unlink) {
     /* Unlink decoded content tmp file and free its filename to avoid
        leaks.  The file stream should already have been closed. */
     if (ct->c_cefile.ce_unlink) {
-        unlink (ct->c_cefile.ce_file);
+        (void) m_unlink (ct->c_cefile.ce_file);
         free (ct->c_cefile.ce_file);
         ct->c_cefile.ce_file = NULL;
         ct->c_cefile.ce_unlink = 0;
         free (ct->c_cefile.ce_file);
         ct->c_cefile.ce_file = NULL;
         ct->c_cefile.ce_unlink = 0;
@@ -1486,7 +1486,7 @@ decode_text_parts (CT ct, int encoding, int *message_mods) {
                                               :  ct->c_ctline  ?  ct->c_ctline
                                                                :  "");
                     }
                                               :  ct->c_ctline  ?  ct->c_ctline
                                                                :  "");
                     }
-                    unlink (ct->c_cefile.ce_file);
+                    (void) m_unlink (ct->c_cefile.ce_file);
                     free (ct->c_cefile.ce_file);
                     ct->c_cefile.ce_file = NULL;
                 } else if (ct->c_encoding == CE_QUOTED  &&
                     free (ct->c_cefile.ce_file);
                     ct->c_cefile.ce_file = NULL;
                 } else if (ct->c_encoding == CE_QUOTED  &&
@@ -1500,7 +1500,7 @@ decode_text_parts (CT ct, int encoding, int *message_mods) {
                                               :  ct->c_ctline  ?  ct->c_ctline
                                                                :  "");
                     }
                                               :  ct->c_ctline  ?  ct->c_ctline
                                                                :  "");
                     }
-                    unlink (ct->c_cefile.ce_file);
+                    (void) m_unlink (ct->c_cefile.ce_file);
                     free (ct->c_cefile.ce_file);
                     ct->c_cefile.ce_file = NULL;
                 } else {
                     free (ct->c_cefile.ce_file);
                     ct->c_cefile.ce_file = NULL;
                 } else {
@@ -1723,13 +1723,13 @@ strip_crs (CT ct, int *message_mods) {
                 if (close (fd)) {
                     admonish (NULL, "unable to write temporary file %s",
                               stripped_content_file);
                 if (close (fd)) {
                     admonish (NULL, "unable to write temporary file %s",
                               stripped_content_file);
-                    unlink (stripped_content_file);
+                    (void) m_unlink (stripped_content_file);
                     status = NOTOK;
                 } else {
                     /* Replace the decoded file with the converted one. */
                     if (ct->c_cefile.ce_file) {
                         if (ct->c_cefile.ce_unlink) {
                     status = NOTOK;
                 } else {
                     /* Replace the decoded file with the converted one. */
                     if (ct->c_cefile.ce_file) {
                         if (ct->c_cefile.ce_unlink) {
-                            unlink (ct->c_cefile.ce_file);
+                            (void) m_unlink (ct->c_cefile.ce_file);
                         }
                         free (ct->c_cefile.ce_file);
                     }
                         }
                         free (ct->c_cefile.ce_file);
                     }
@@ -1923,7 +1923,7 @@ convert_codeset (CT ct, char *dest_codeset, int *message_mods) {
             /* Replace the decoded file with the converted one. */
             if (ct->c_cefile.ce_file) {
                 if (ct->c_cefile.ce_unlink) {
             /* Replace the decoded file with the converted one. */
             if (ct->c_cefile.ce_file) {
                 if (ct->c_cefile.ce_unlink) {
-                    unlink (ct->c_cefile.ce_file);
+                    (void) m_unlink (ct->c_cefile.ce_file);
                 }
                 free (ct->c_cefile.ce_file);
             }
                 }
                 free (ct->c_cefile.ce_file);
             }
@@ -1962,7 +1962,7 @@ convert_codeset (CT ct, char *dest_codeset, int *message_mods) {
                 }
             }
         } else {
                 }
             }
         } else {
-            unlink (dest);
+            (void) m_unlink (dest);
         }
 #else  /* ! HAVE_ICONV */
         NMH_UNUSED (message_mods);
         }
 #else  /* ! HAVE_ICONV */
         NMH_UNUSED (message_mods);
@@ -2012,7 +2012,7 @@ write_content (CT ct, char *input_filename, char *outfile, int modify_inplace,
                         }
                         if (new != -1) close (new);
                         if (old != -1) close (old);
                         }
                         if (new != -1) close (new);
                         if (old != -1) close (old);
-                        unlink (outfile);
+                        (void) m_unlink (outfile);
 
                         if (i < 0) {
                             /* The -file argument processing used path() to
 
                         if (i < 0) {
                             /* The -file argument processing used path() to
@@ -2028,7 +2028,7 @@ write_content (CT ct, char *input_filename, char *outfile, int modify_inplace,
                 } else {
                     admonish (NULL, "unable to remove input file %s, "
                               "not modifying it", infile);
                 } else {
                     admonish (NULL, "unable to remove input file %s, "
                               "not modifying it", infile);
-                    unlink (outfile);
+                    (void) m_unlink (outfile);
                     status = NOTOK;
                 }
 
                     status = NOTOK;
                 }
 
@@ -2038,7 +2038,7 @@ write_content (CT ct, char *input_filename, char *outfile, int modify_inplace,
             }
         } else {
             /* No modifications and didn't need the tmp outfile. */
             }
         } else {
             /* No modifications and didn't need the tmp outfile. */
-            unlink (outfile);
+            (void) m_unlink (outfile);
         }
     } else {
         /* Output is going to some file.  Produce it whether or not
         }
     } else {
         /* Output is going to some file.  Produce it whether or not
index 5fa2a59cfa3bc1ff3059aede1c28d8748e21a0f1..29756876fdd11637a6cbafccd03d1a7191a05123 100644 (file)
@@ -106,7 +106,7 @@ free_content (CT ct)
 
     if (ct->c_file) {
        if (ct->c_unlink)
 
     if (ct->c_file) {
        if (ct->c_unlink)
-           unlink (ct->c_file);
+           (void) m_unlink (ct->c_file);
        free (ct->c_file);
     }
     if (ct->c_fp)
        free (ct->c_file);
     }
     if (ct->c_fp)
@@ -270,7 +270,7 @@ free_encoding (CT ct, int toplevel)
 
     if (ce->ce_file) {
        if (ce->ce_unlink)
 
     if (ce->ce_file) {
        if (ce->ce_unlink)
-           unlink (ce->ce_file);
+           (void) m_unlink (ce->ce_file);
        free (ce->ce_file);
        ce->ce_file = NULL;
     }
        free (ce->ce_file);
        ce->ce_file = NULL;
     }
index 58f3a81c7b5d0cefa435ba0ca4178e59ebde288b..716a22f73144de4b8436883d9cfe87c9d2c41459 100644 (file)
@@ -205,12 +205,12 @@ parse_mime (char *file)
        fflush (fp);
 
        if (ferror (stdin)) {
        fflush (fp);
 
        if (ferror (stdin)) {
-           unlink (file);
+           (void) m_unlink (file);
            advise ("stdin", "error reading");
            return NULL;
        }
        if (ferror (fp)) {
            advise ("stdin", "error reading");
            return NULL;
        }
        if (ferror (fp)) {
-           unlink (file);
+           (void) m_unlink (file);
            advise (file, "error writing");
            return NULL;
        }
            advise (file, "error writing");
            return NULL;
        }
@@ -222,7 +222,7 @@ parse_mime (char *file)
 
     if (!(ct = get_content (fp, file, 1))) {
        if (is_stdin)
 
     if (!(ct = get_content (fp, file, 1))) {
        if (is_stdin)
-           unlink (file);
+           (void) m_unlink (file);
        advise (NULL, "unable to decode %s", file);
        return NULL;
     }
        advise (NULL, "unable to decode %s", file);
        return NULL;
     }
@@ -2340,12 +2340,12 @@ openFile (CT ct, char **file)
 
            if (ferror (gp)) {
                admonish (ce->ce_file, "error reading");
 
            if (ferror (gp)) {
                admonish (ce->ce_file, "error reading");
-               unlink (cachefile);
+               (void) m_unlink (cachefile);
            }
            else
                if (ferror (fp)) {
                    admonish (cachefile, "error writing");
            }
            else
                if (ferror (fp)) {
                    admonish (cachefile, "error writing");
-                   unlink (cachefile);
+                   (void) m_unlink (cachefile);
                }
            fclose (fp);
        }
                }
            fclose (fp);
        }
@@ -2556,12 +2556,12 @@ openFTP (CT ct, char **file)
 
                if (ferror (gp)) {
                    admonish (ce->ce_file, "error reading");
 
                if (ferror (gp)) {
                    admonish (ce->ce_file, "error reading");
-                   unlink (cachefile);
+                   (void) m_unlink (cachefile);
                }
                else
                    if (ferror (fp)) {
                        admonish (cachefile, "error writing");
                }
                else
                    if (ferror (fp)) {
                        admonish (cachefile, "error writing");
-                       unlink (cachefile);
+                       (void) m_unlink (cachefile);
                    }
                fclose (fp);
            }
                    }
                fclose (fp);
            }
@@ -2831,7 +2831,7 @@ openURL (CT ct, char **file)
 
                if (ferror(gp)) {
                    admonish(ce->ce_file, "error reading");
 
                if (ferror(gp)) {
                    admonish(ce->ce_file, "error reading");
-                   unlink(cachefile);
+                   (void) m_unlink (cachefile);
                }
            }
            umask(mask);
                }
            }
            umask(mask);
index 3b68970297ffaa69739a2221abf95bf684d6162f..7b1dbd519b5c3655eed7d734b5ed4b5ac94b6d0b 100644 (file)
@@ -626,7 +626,7 @@ got_filename:
      */
     if (ct->c_folder && (!is_partial || last_partial)) {
        msgnum = output_content_folder (ct->c_folder, ct->c_storage);
      */
     if (ct->c_folder && (!is_partial || last_partial)) {
        msgnum = output_content_folder (ct->c_folder, ct->c_storage);
-       unlink (ct->c_storage);
+       (void) m_unlink (ct->c_storage);
        if (msgnum == NOTOK)
            return NOTOK;
     }
        if (msgnum == NOTOK)
            return NOTOK;
     }
index 30459136f712413bce2bf7c6e5bafa9b63e99364..b85a91ea782730c15780ce12812f0be1f741821e 100644 (file)
@@ -343,7 +343,6 @@ static void
 pipeser (int i)
 {
     if (i == SIGQUIT) {
 pipeser (int i)
 {
     if (i == SIGQUIT) {
-       unlink ("core");
        fflush (stdout);
        fprintf (stderr, "\n");
        fflush (stderr);
        fflush (stdout);
        fprintf (stderr, "\n");
        fflush (stderr);
index fbfb408e007613679fd915cb3db3cf655f8881dd..e91924c35db2275236cce48fdada9739a49df0b0 100644 (file)
--- a/uip/msh.c
+++ b/uip/msh.c
@@ -1114,7 +1114,7 @@ quit (void)
                close (i);
            else
                advise (mp->foldpath, "error zero'ing");
                close (i);
            else
                advise (mp->foldpath, "error zero'ing");
-           unlink (map_name (mp->foldpath));/* XXX */
+           (void) m_unlink (map_name (mp->foldpath));/* XXX */
        }
        goto release;
     }
        }
        goto release;
     }
@@ -1131,8 +1131,8 @@ quit (void)
     for (msgnum = mp->lowmsg; msgnum <= mp->hghmsg; msgnum++)
        if (does_exist(mp, msgnum) && pack (tmpfil, md, msgnum) == NOTOK) {
            mbx_close (tmpfil, md);
     for (msgnum = mp->lowmsg; msgnum <= mp->hghmsg; msgnum++)
        if (does_exist(mp, msgnum) && pack (tmpfil, md, msgnum) == NOTOK) {
            mbx_close (tmpfil, md);
-           unlink (tmpfil);
-           unlink (map_name (tmpfil));
+           (void) m_unlink (tmpfil);
+           (void) m_unlink (map_name (tmpfil));
            goto release;
        }
     mbx_close (tmpfil, md);
            goto release;
        }
     mbx_close (tmpfil, md);
@@ -1145,8 +1145,8 @@ quit (void)
 
        if (rename (map1, map2) == NOTOK) {
            admonish (map2, "unable to rename %s to", map1);
 
        if (rename (map1, map2) == NOTOK) {
            admonish (map2, "unable to rename %s to", map1);
-           unlink (map1);
-           unlink (map2);
+           (void) m_unlink (map1);
+           (void) m_unlink (map2);
        }
     }
 
        }
     }
 
index 3a5f98fa4add71b9bb0f0370ad8a1cec7f4ac9f2..6627c6ab61d2c61c3db51d15be677550084d5833 100644 (file)
@@ -1011,7 +1011,7 @@ forw (char *proc, char *filter, int vecp, char **vec)
                break;
        }
 
                break;
        }
 
-    unlink (tmpfil);
+    (void) m_unlink (tmpfil);
 }
 
 
 }
 
 
@@ -2842,7 +2842,7 @@ ready: ;
     }
 
     if (!fmsh)
     }
 
     if (!fmsh)
-       unlink (tmpfil);
+       (void) m_unlink (tmpfil);
     return status;
 }
 
     return status;
 }
 
index 5d227c40a959b378e355df0adc3faf39edf3f474..9b358521c97afe13e3f03f21b41a4eb1a83fbe3b 100644 (file)
@@ -630,13 +630,13 @@ main (int argc, char **argv)
            post (tmpfil, 0, verbose, envelope);
        }
        post (bccfil, 1, verbose, envelope);
            post (tmpfil, 0, verbose, envelope);
        }
        post (bccfil, 1, verbose, envelope);
-       unlink (bccfil);
+       (void) m_unlink (bccfil);
     } else {
        post (tmpfil, 0, isatty (1), envelope);
     }
 
     p_refile (tmpfil);
     } else {
        post (tmpfil, 0, isatty (1), envelope);
     }
 
     p_refile (tmpfil);
-    unlink (tmpfil);
+    (void) m_unlink (tmpfil);
 
     if (verbose) {
        if (partno)
 
     if (verbose) {
        if (partno)
@@ -1705,9 +1705,9 @@ sigser (int i)
 {
     NMH_UNUSED (i);
 
 {
     NMH_UNUSED (i);
 
-    unlink (tmpfil);
+    (void) m_unlink (tmpfil);
     if (msgflags & MINV)
     if (msgflags & MINV)
-       unlink (bccfil);
+       (void) m_unlink (bccfil);
 
     if (!whomsw || checksw)
        sm_end (NOTOK);
 
     if (!whomsw || checksw)
        sm_end (NOTOK);
@@ -1829,9 +1829,9 @@ die (char *what, char *fmt, ...)
 {
     va_list ap;
 
 {
     va_list ap;
 
-    unlink (tmpfil);
+    (void) m_unlink (tmpfil);
     if (msgflags & MINV)
     if (msgflags & MINV)
-       unlink (bccfil);
+       (void) m_unlink (bccfil);
 
     if (!whomsw || checksw)
        sm_end (NOTOK);
 
     if (!whomsw || checksw)
        sm_end (NOTOK);
index 35052e62ae0d8beae5dd1213094c1974011ce130..37f5960b0c322a622af6775c38d62361bc1420ce 100644 (file)
@@ -227,7 +227,7 @@ abort:
                        if (killp || erasep) {
                            tcsetattr(0, TCSADRAIN, &tio);
                        }
                        if (killp || erasep) {
                            tcsetattr(0, TCSADRAIN, &tio);
                        }
-                       unlink (tmpfil);
+                       (void) m_unlink (tmpfil);
                        done (1);
                    }
                    if (i != 0 || (field[0] != '\n' && field[0] != 0)) {
                        done (1);
                    }
                    if (i != 0 || (field[0] != '\n' && field[0] != 0)) {
@@ -316,7 +316,7 @@ abort:
     cpydata (fdi, fdo, tmpfil, drft);
     close (fdi);
     close (fdo);
     cpydata (fdi, fdo, tmpfil, drft);
     close (fdi);
     close (fdo);
-    unlink (tmpfil);
+    (void) m_unlink (tmpfil);
 
     context_save ();   /* save the context file */
     done (0);
 
     context_save ();   /* save the context file */
     done (0);
index a87a5e84d324773b239cb19c908b26a666c2cf09..85baf33db00a6a8d9596d820038122f67a8a6266 100644 (file)
@@ -253,11 +253,11 @@ static void
 unlink_done (int status)
 {
     if (backup[0])
 unlink_done (int status)
 {
     if (backup[0])
-       unlink (backup);
+       (void) m_unlink (backup);
     if (drft[0])
     if (drft[0])
-       unlink (drft);
+       (void) m_unlink (drft);
     if (tmpfil[0])
     if (tmpfil[0])
-       unlink (tmpfil);
+       (void) m_unlink (tmpfil);
 
     exit (status ? RCV_MBX : RCV_MOK);
 }
 
     exit (status ? RCV_MBX : RCV_MOK);
 }
index 64b4a0072efd80d99e702c9bd94baa9a2dc154b9..be0ac396641494eed665bf6396c6271a221eb869 100644 (file)
@@ -166,7 +166,7 @@ main (int argc, char **argv)
     cpydata (fileno (stdin), fd, "standard input", tmpfilenam);
 
     if (fstat (fd, &st) == NOTOK) {
     cpydata (fileno (stdin), fd, "standard input", tmpfilenam);
 
     if (fstat (fd, &st) == NOTOK) {
-       unlink (tmpfilenam);
+       (void) m_unlink (tmpfilenam);
        adios (tmpfilenam, "unable to fstat");
     }
     if (close (fd) == NOTOK)
        adios (tmpfilenam, "unable to fstat");
     }
     if (close (fd) == NOTOK)
@@ -174,7 +174,7 @@ main (int argc, char **argv)
 
     /* don't add file if it is empty */
     if (st.st_size == 0) {
 
     /* don't add file if it is empty */
     if (st.st_size == 0) {
-       unlink (tmpfilenam);
+       (void) m_unlink (tmpfilenam);
        advise (NULL, "empty file");
        done (0);
     }
        advise (NULL, "empty file");
        done (0);
     }
@@ -212,7 +212,7 @@ main (int argc, char **argv)
     folder_free (mp);          /* free folder/message structure          */
 
     context_save ();           /* save the global context file           */
     folder_free (mp);          /* free folder/message structure          */
 
     context_save ();           /* save the global context file           */
-    unlink (tmpfilenam);       /* remove temporary file                  */
+    (void) m_unlink (tmpfilenam); /* remove temporary file                  */
     tmpfilenam = NULL;
 
     done (0);
     tmpfilenam = NULL;
 
     done (0);
@@ -226,6 +226,6 @@ static void
 unlink_done(int status)
 {
     if (tmpfilenam && *tmpfilenam)
 unlink_done(int status)
 {
     if (tmpfilenam && *tmpfilenam)
-       unlink (tmpfilenam);
+       (void) m_unlink (tmpfilenam);
     exit (status);
 }
     exit (status);
 }
index 8ddc15d1d66df489b790827c7c2b09fd75371f2c..3bee075e038e6165f50593c1cb11a952154e60ef 100644 (file)
@@ -192,7 +192,7 @@ message_fd (char **vec)
        advise(NULL, "unable to create temporary file in %s", get_temp_dir());
        return NOTOK;
     }
        advise(NULL, "unable to create temporary file in %s", get_temp_dir());
        return NOTOK;
     }
-    m_unlink(tfile);  /* Use fd, no longer need the file name. */
+    (void) m_unlink(tfile);  /* Use fd, no longer need the file name. */
 
     if ((child_id = fork()) == NOTOK) {
        /* fork error */
 
     if ((child_id = fork()) == NOTOK) {
        /* fork error */
@@ -256,7 +256,7 @@ header_fd (void)
        advise(NULL, "unable to create temporary file in %s", get_temp_dir());
         return NOTOK;
     }
        advise(NULL, "unable to create temporary file in %s", get_temp_dir());
         return NOTOK;
     }
-    m_unlink(tfile);  /* Use fd, no longer need the file name. */
+    (void) m_unlink(tfile);  /* Use fd, no longer need the file name. */
 
     rewind (stdin);
 
 
     rewind (stdin);
 
index 1dc2dff40c1c43b5900ce6e2c3a3f168d575064f..ecbe346627504d0e0467eb233f7f8d283de0689c 100644 (file)
@@ -338,7 +338,7 @@ remove_files (int filep, char **files)
     /* Else just unlink the files */
     files++;   /* advance past filevec[0] */
     for (i = 0; i < filep; i++) {
     /* Else just unlink the files */
     files++;   /* advance past filevec[0] */
     for (i = 0; i < filep; i++) {
-       if (unlink (files[i]) == NOTOK)
+       if (m_unlink (files[i]) == NOTOK)
            admonish (files[i], "unable to unlink");
     }
 }
            admonish (files[i], "unable to unlink");
     }
 }
index 765ec9e19851e176413c9c3c05ccc2f7bc687f9e..bb03805a1b1300fb5e3dd344b456133c131a1e79 100644 (file)
--- a/uip/rmf.c
+++ b/uip/rmf.c
@@ -179,7 +179,7 @@ rmf (char *folder)
                others++;
                continue;
        }
                others++;
                continue;
        }
-       if (unlink (dp->d_name) == NOTOK) {
+       if (m_unlink (dp->d_name) == NOTOK) {
            admonish (dp->d_name, "unable to unlink %s:", folder);
            others++;
        }
            admonish (dp->d_name, "unable to unlink %s:", folder);
            others++;
        }
index c8ad788bbb960a255051d7f052a5ebaa555bbd45..9d6e2076d542556ab4a7e84bdd8ee75d32c818f0 100644 (file)
@@ -397,7 +397,7 @@ go_to_it:
                  get_temp_dir());
        }
        distfile = getcpy (cp);
                  get_temp_dir());
        }
        distfile = getcpy (cp);
-       unlink(distfile);
+       (void) m_unlink(distfile);
        if (link (altmsg, distfile) == NOTOK) {
            /* Cygwin with FAT32 filesystem produces EPERM. */
            if (errno != EXDEV  &&  errno != EPERM
        if (link (altmsg, distfile) == NOTOK) {
            /* Cygwin with FAT32 filesystem produces EPERM. */
            if (errno != EXDEV  &&  errno != EPERM
index c1914aa13c675f07ba4c3e4a6f5cd5e86e29059c..ad48b882ef81218ff48f0ac499b27622987d10ba 100644 (file)
@@ -143,7 +143,7 @@ sendsbr (char **vec, int vecp, char *program, char *drft, struct stat *st,
 
     done=exit;
     if (distfile)
 
     done=exit;
     if (distfile)
-       unlink (distfile);
+       (void) m_unlink (distfile);
 
     /*
      * Get rid of any temporary files that we created for attachments.  Also get rid of
 
     /*
      * Get rid of any temporary files that we created for attachments.  Also get rid of
@@ -168,7 +168,7 @@ sendsbr (char **vec, int vecp, char *program, char *drft, struct stat *st,
            (void)strcpy(p, body_file_name);
            (void)strcat(p, ".orig");
            
            (void)strcpy(p, body_file_name);
            (void)strcat(p, ".orig");
            
-           (void)unlink(composition_file_name);
+           (void)m_unlink(composition_file_name);
        }
     }
 
        }
     }
 
@@ -389,7 +389,7 @@ splitmsg (char **vec, int vecp, char *program, char *drft,
 
        snprintf (partnum, sizeof(partnum), "%d", partno);
        status = sendaux (vec, vecp, program, tmpdrf, st);
 
        snprintf (partnum, sizeof(partnum), "%d", partno);
        status = sendaux (vec, vecp, program, tmpdrf, st);
-       unlink (tmpdrf);
+       (void) m_unlink (tmpdrf);
        if (status != OK)
            break;
 
        if (status != OK)
            break;
 
@@ -487,7 +487,7 @@ sendaux (char **vec, int vecp, char *program, char *drft, struct stat *st)
            if (annotext && fd2 != NOTOK)
                close (fd2);
            if (distfile) {
            if (annotext && fd2 != NOTOK)
                close (fd2);
            if (distfile) {
-               unlink (drft);
+               (void) m_unlink (drft);
                if (rename (backup, drft) == NOTOK)
                    advise (drft, "unable to rename %s to", backup);
            }
                if (rename (backup, drft) == NOTOK)
                    advise (drft, "unable to rename %s to", backup);
            }
@@ -580,7 +580,7 @@ tmp_fd (void)
     if (debugsw)
        advise (NULL, "temporary file %s selected", tfile);
     else
     if (debugsw)
        advise (NULL, "temporary file %s selected", tfile);
     else
-       if (unlink (tfile) == NOTOK)
+       if (m_unlink (tfile) == NOTOK)
            advise (tfile, "unable to remove");
 
     return fd;
            advise (tfile, "unable to remove");
 
     return fd;
index 6e22076a82817b25fd9f35a31f597c60984f1ff5..eaa7cb7c5bc2380e086575bfe589dc852e4971dd 100644 (file)
@@ -336,7 +336,7 @@ main (int argc, char **argv)
        thing would be to delay this unlink() until later if debug == 1, but I'll
        leave that for someone who cares about the temp-file-accessing
        functionality (they'll have to watch out for cases where we adios()). */
        thing would be to delay this unlink() until later if debug == 1, but I'll
        leave that for someone who cares about the temp-file-accessing
        functionality (they'll have to watch out for cases where we adios()). */
-    unlink (tmpfil);
+    (void) m_unlink (tmpfil);
 
     if (!(fp = fdopen (fd, "r+")))
        adios (NULL, "unable to access temporary file");
 
     if (!(fp = fdopen (fd, "r+")))
        adios (NULL, "unable to access temporary file");
@@ -1200,7 +1200,7 @@ copy_message (int qd, char *tmpfil, int fold)
            if (write (fd1, buffer, i) != i) {
 you_lose:
                close (fd1);
            if (write (fd1, buffer, i) != i) {
 you_lose:
                close (fd1);
-               unlink (tmpfil);
+               (void) m_unlink (tmpfil);
                return -1;
            }
        if (i == -1)
                return -1;
            }
        if (i == -1)
index 10adf5372f5ae3ef787f58146451bac07f83c4a3..6bce740f145bf01a1be3469d25e9c10c58a7074c 100644 (file)
@@ -253,8 +253,8 @@ via_mail (char *mailsw, char *subjsw, char *parmsw, char *descsw,
     }
 
     fclose (fp);
     }
 
     fclose (fp);
-    if (unlink (tmpfil) == -1)
-       advise (NULL, "unable to remove temp file %s", tmpfil);
+    if (m_unlink (tmpfil) == -1)
+       advise (tmpfil, "unable to remove temp file %s", tmpfil);
     done (status);
     return 1;
 }
     done (status);
     return 1;
 }
index 3663f4782b2c00c4ff1045d6ea33e20e14502976..7f5c6c3ce3dd47b48d5e5701d89740eeaa0b16d7 100644 (file)
@@ -235,7 +235,7 @@ WhatNow (int argc, char **argv)
 #else /* ! READLINE_SUPPORT */
        if (!(argp = getans (prompt, aleqs))) {
 #endif /* READLINE_SUPPORT */
 #else /* ! READLINE_SUPPORT */
        if (!(argp = getans (prompt, aleqs))) {
 #endif /* READLINE_SUPPORT */
-           unlink (LINK);
+           (void) m_unlink (LINK);
            done (1);
        }
        switch (smatch (*argp, aleqs)) {
            done (1);
        }
        switch (smatch (*argp, aleqs)) {
@@ -696,7 +696,7 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp,
            snprintf (linkpath, sizeof(linkpath), "%s/%s", cwd, LINK);
 
        if (atfile) {
            snprintf (linkpath, sizeof(linkpath), "%s/%s", cwd, LINK);
 
        if (atfile) {
-           unlink (linkpath);
+           (void) m_unlink (linkpath);
            if (link (altpath, linkpath) == NOTOK) {
                symlink (altpath, linkpath);
                slinked = 1;
            if (link (altpath, linkpath) == NOTOK) {
                symlink (altpath, linkpath);
                slinked = 1;
@@ -762,7 +762,7 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp,
                                && copyf (linkpath, altpath) == NOTOK
                           : stat (linkpath, &st) != NOTOK
                                && st.st_nlink == 1
                                && copyf (linkpath, altpath) == NOTOK
                           : stat (linkpath, &st) != NOTOK
                                && st.st_nlink == 1
-                               && (unlink (altpath) == NOTOK
+                               && (m_unlink (altpath) == NOTOK
                                        || link (linkpath, altpath) == NOTOK)))
                advise (linkpath, "unable to update %s from", altmsg);
     }
                                        || link (linkpath, altpath) == NOTOK)))
                advise (linkpath, "unable to update %s from", altmsg);
     }
@@ -773,7 +773,7 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp,
 
     *ed = NULL;
     if (altmsg && atfile)
 
     *ed = NULL;
     if (altmsg && atfile)
-       unlink (linkpath);
+       (void) m_unlink (linkpath);
 
     return status;
 }
 
     return status;
 }
@@ -1304,7 +1304,7 @@ sendit (char *sp, char **arg, char *file, int pushed)
                  get_temp_dir());
        }
        distfile = getcpy (cp);
                  get_temp_dir());
        }
        distfile = getcpy (cp);
-       unlink(distfile);
+       (void) m_unlink(distfile);
        if (link (altmsg, distfile) == NOTOK)
            adios (distfile, "unable to link %s to", altmsg);
     } else {
        if (link (altmsg, distfile) == NOTOK)
            adios (distfile, "unable to link %s to", altmsg);
     } else {
@@ -1370,7 +1370,7 @@ whomfile (char **arg, char *file)
 static int
 removefile (char *drft)
 {
 static int
 removefile (char *drft)
 {
-    if (unlink (drft) == NOTOK)
+    if (m_unlink (drft) == NOTOK)
        adios (drft, "unable to unlink");
 
     return OK;
        adios (drft, "unable to unlink");
 
     return OK;
index 980cdda5bf38f9db797868b5bb2de6d1523b22b7..2a36025aeb6846425a9e4036390c1e120bfc298c 100644 (file)
@@ -196,7 +196,7 @@ main (int argc, char **argv)
 
            status = pidwait(child_id, OK);
 
 
            status = pidwait(child_id, OK);
 
-           unlink (msg);
+           (void) m_unlink (msg);
            if (rename (backup, msg) == NOTOK)
                adios (msg, "unable to rename %s to", backup);
            done (status);
            if (rename (backup, msg) == NOTOK)
                adios (msg, "unable to rename %s to", backup);
            done (status);