]> diplodocus.org Git - nmh/blob - sbr/remdir.c
Fix invalid pointer arithmetic.
[nmh] / sbr / remdir.c
1 /* remdir.c -- remove a directory
2 *
3 * This code is Copyright (c) 2002, by the authors of nmh. See the
4 * COPYRIGHT file in the root directory of the nmh distribution for
5 * complete copyright information.
6 */
7
8 #include <h/mh.h>
9
10
11 int
12 remdir (char *dir)
13 {
14 context_save(); /* save the context file */
15 fflush(stdout);
16
17 if (rmdir(dir) == -1) {
18 admonish (dir, "unable to remove directory");
19 return 0;
20 }
21 return 1;
22 }