diff options
Diffstat (limited to 'usr.bin/patch/backupfile.c')
-rw-r--r-- | usr.bin/patch/backupfile.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/patch/backupfile.c b/usr.bin/patch/backupfile.c index 856d2a6f948..eb25313f00f 100644 --- a/usr.bin/patch/backupfile.c +++ b/usr.bin/patch/backupfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: backupfile.c,v 1.18 2004/08/05 21:47:24 deraadt Exp $ */ +/* $OpenBSD: backupfile.c,v 1.19 2006/03/11 19:41:30 otto Exp $ */ /* * backupfile.c -- make Emacs style backup file names Copyright (C) 1990 Free @@ -17,7 +17,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: backupfile.c,v 1.18 2004/08/05 21:47:24 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: backupfile.c,v 1.19 2006/03/11 19:41:30 otto Exp $"; #endif /* not lint */ #include <ctype.h> @@ -45,7 +45,7 @@ char *simple_backup_suffix = "~"; static char *concat(const char *, const char *); static char *make_version_name(const char *, int); static int max_backup_version(const char *, const char *); -static int version_number(const char *, const char *, int); +static int version_number(const char *, const char *, size_t); static int argmatch(const char *, const char **); static void invalid_arg(const char *, const char *, int); @@ -88,7 +88,8 @@ max_backup_version(const char *file, const char *dir) { DIR *dirp; struct dirent *dp; - int highest_version, this_version, file_name_length; + int highest_version, this_version; + size_t file_name_length; dirp = opendir(dir); if (dirp == NULL) @@ -129,7 +130,7 @@ make_version_name(const char *file, int version) * already have ".~" appended to it. */ static int -version_number(const char *base, const char *backup, int base_length) +version_number(const char *base, const char *backup, size_t base_length) { int version; const char *p; |