aboutsummaryrefslogtreecommitdiffstats
path: root/g10/tdbio.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/tdbio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/g10/tdbio.c b/g10/tdbio.c
index 22592ae93..9bcb6aa14 100644
--- a/g10/tdbio.c
+++ b/g10/tdbio.c
@@ -633,12 +633,15 @@ tdbio_read_modify_stamp( int modify_down )
}
void
-tdbio_write_modify_stamp( int down, int up )
+tdbio_write_modify_stamp( int up, int down )
{
TRUSTREC vr;
int rc;
ulong stamp;
+ if( !(up || down) )
+ return;
+
rc = tdbio_read_record( 0, &vr, RECTYPE_VER );
if( rc )
log_fatal( _("%s: error reading version record: %s\n"),
@@ -651,7 +654,7 @@ tdbio_write_modify_stamp( int down, int up )
vr.r.ver.mod_up = stamp;
rc = tdbio_write_record( &vr );
- if( !rc )
+ if( rc )
log_fatal( _("%s: error writing version record: %s\n"),
db_name, g10_errstr(rc) );
}