static const char *filename, *fileeditname;
static bool filelocked = false;
static bool createedit = false;
-static int (*unlock) (void);
+static int (*unlock) (bool);
static bool quiet = false;
#ifdef WITH_TCB
static const char *user = NULL;
static void usage (int status);
static int create_backup_file (FILE *, const char *, struct stat *);
static void vipwexit (const char *msg, int syserr, int ret);
-static void vipwedit (const char *, int (*)(void), int (*)(void));
+static void vipwedit (const char *, int (*)(void), int (*)(bool));
/*
* usage - display usage message and exit
}
}
if (filelocked) {
- if ((*unlock) () == 0) {
+ if ((*unlock) (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, fileeditname);
SYSLOG ((LOG_ERR, "failed to unlock %s", fileeditname));
/* continue */
*
*/
static void
-vipwedit (const char *file, int (*file_lock) (void), int (*file_unlock) (void))
+vipwedit (const char *file, int (*file_lock) (void), int (*file_unlock) (bool))
{
int status;
char *to_rename;
}
#endif /* WITH_TCB */
- if ((*file_unlock) () == 0) {
+ if ((*file_unlock) (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, fileeditname);
SYSLOG ((LOG_ERR, "failed to unlock %s", fileeditname));
/* continue */