X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=dotlock.c;h=94f569f6b8a38a78307da9625c9665864da994f9;hp=8d562c8a50f8499aa7de3463276fad0907355769;hb=5fbd8a74d24624a118c9b835b136c73b8da076d7;hpb=f3cbb9f51357972f6e74244494236a41dc4d84cd diff --git a/dotlock.c b/dotlock.c index 8d562c8..94f569f 100644 --- a/dotlock.c +++ b/dotlock.c @@ -68,7 +68,9 @@ static int dotlock_unlink (const char *); static int dotlock_lock (const char *); -#define check_flags(a) if (a & DL_FL_ACTIONS) usage (argv[0]) +#define check_flags(a) \ + if (a & (DL_FL_TRY|DL_FL_UNLOCK|DL_FL_UNLINK)) \ + usage(argv[0]) int main (int argc, char **argv) { @@ -420,11 +422,9 @@ dotlock_expand_link (char *newpath, const char *path, const char *flink) /* * Deference a chain of symbolic links - * - * The final path is written to d. * + * The final path is written to d. */ - static int dotlock_deference_symlink (char *d, size_t l, const char *path) { struct stat sb;