X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c9492787464d45334fccd8dce432744fc9321ba6..a940963381421de5cd0354c6fd1491754b5d1f5c:/sbr/lock_file.c diff --git a/sbr/lock_file.c b/sbr/lock_file.c index 65b89079..51576ea8 100644 --- a/sbr/lock_file.c +++ b/sbr/lock_file.c @@ -2,8 +2,6 @@ /* * lock.c -- routines to lock/unlock files * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -109,11 +107,11 @@ static void lockname (char *, struct lockinfo *, int); static void timerON (char *, int); static void timerOFF (int); static RETSIGTYPE alrmser (int); -#endif #if !defined(HAVE_LIBLOCKFILE) static int lockit (struct lockinfo *); #endif +#endif /* * Base routine to open and lock a file, @@ -494,7 +492,7 @@ lockname (char *file, struct lockinfo *li, int isnewlock) bplen += tmplen; #else if (cp != file) { - snprintf (bp, sizeof(li->curlock), "%.*s", cp - file, file); + snprintf (bp, sizeof(li->curlock), "%.*s", (int)(cp - file), file); tmplen = strlen (bp); bp += tmplen; bplen += tmplen; @@ -526,7 +524,7 @@ lockname (char *file, struct lockinfo *li, int isnewlock) strncpy (li->tmplock, ",LCK.XXXXXX", sizeof(li->tmplock)); else snprintf (li->tmplock, sizeof(li->tmplock), "%.*s,LCK.XXXXXX", - cp - li->curlock, li->curlock); + (int)(cp - li->curlock), li->curlock); } #endif }