Skip to content

Commit 62d8443

Browse files
two-hearttopointon-jump
authored andcommitted
funk: fix return code in fd_funk_rec_remove
the contract promises FD_FUNK_ERR_KEY in this case
1 parent a6a3c5f commit 62d8443

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/funk/fd_funk_rec.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ fd_funk_rec_remove( fd_funk_t * funk,
387387
for(;;) {
388388
int err = fd_funk_rec_map_query_try( funk->rec_map, pair, NULL, query, 0 );
389389
if( err == FD_MAP_SUCCESS ) break;
390-
if( err == FD_MAP_ERR_KEY ) return FD_FUNK_SUCCESS;
390+
if( err == FD_MAP_ERR_KEY ) return FD_FUNK_ERR_KEY;
391391
if( err == FD_MAP_ERR_AGAIN ) continue;
392392
FD_LOG_CRIT(( "query returned err %d", err ));
393393
}

src/funk/fd_funk_rec.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ fd_funk_rec_clone( fd_funk_t * funk,
269269

270270
/* fd_funk_rec_remove removes the live record with the
271271
given (xid,key) from funk. Returns FD_FUNK_SUCCESS (0) on
272-
success and a FD_FUNK_ERR_* (negative) on failure. Reasons for
272+
success and an FD_FUNK_ERR_* (negative) on failure. Reasons for
273273
failure include:
274274
275275
FD_FUNK_ERR_INVAL - bad inputs (NULL funk, NULL xid)

0 commit comments

Comments
 (0)