aboutsummaryrefslogtreecommitdiffstats
path: root/g10/verify.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/verify.c')
-rw-r--r--g10/verify.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/g10/verify.c b/g10/verify.c
index 37a0caeb6..680fed0ff 100644
--- a/g10/verify.c
+++ b/g10/verify.c
@@ -84,6 +84,17 @@ verify_signatures( int nfiles, char **files )
return rc;
}
+
+static void
+print_file_status( int status, const char *name, int what )
+{
+ char *p = m_alloc(strlen(name)+10);
+ sprintf(p, "%d %s", what, name );
+ write_status_text( status, p );
+ m_free(p);
+}
+
+
static int
verify_one_file( const char *name )
{
@@ -91,15 +102,10 @@ verify_one_file( const char *name )
armor_filter_context_t afx;
int rc;
-
- {
- char *p = m_alloc(strlen(name)+10);
- sprintf(p, "1 %s", name );
- write_status_text( STATUS_FILE_START, p );
- m_free(p);
- }
+ print_file_status( STATUS_FILE_START, name, 1 );
fp = iobuf_open(name);
if( !fp ) {
+ print_file_status( STATUS_FILE_ERROR, name, 1 );
log_error(_("can't open `%s'\n"), print_fname_stdin(name));
return G10ERR_OPEN_FILE;
}