Skip to content

Commit cae17c9

Browse files
esemeniucmmcgee-jump
authored andcommitted
bundle_tile: clear errorno to get deterministic value when iterating through directories
1 parent 20ecc60 commit cae17c9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/disco/bundle/fd_bundle_tile.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ fd_bundle_tile_load_certs( SSL_CTX * ssl_ctx ) {
334334
}
335335

336336
struct dirent * entry;
337+
errno = 0; // clear old value since entry can be NULL when reaching end of directory.
337338
while( (entry = readdir( dir )) ) {
338339
if( !strcmp( entry->d_name, "." ) || !strcmp( entry->d_name, ".." ) ) continue;
339340

0 commit comments

Comments
 (0)