Fix return value when hash_index_get fails to load the index file, fix debug in commented-out code

master
teknomunk 2 years ago
parent c5b4f6e732
commit 3bd10ea746

@ -121,13 +121,13 @@ bool hash_index_get( const char* index, const char* key, int* value )
struct hash_index hi;
memset( &hi, 0, sizeof(hi) );
if( !json_read_object_layout_from_file( filename, hash_index_layout, &hi ) ) {
return -1;
return false;
}
/*
for( int i = 0; i < ari.entries.count; ++i ) {
struct reverse_index_entry* entry = ari.entries.items[i];
printf( "\tentry[%d] = %p{ .uri = %s, .account_id = %d }\n", i, entry, entry->uri, entry->account_id );
for( int i = 0; i < hi.entries.count; ++i ) {
struct hash_index_entry* entry = hi.entries.items[i];
printf( "\tentry[%d] = %p{ .uri = %s, .account_id = %d }\n", i, entry, entry->key, entry->value );
}
//*/

Loading…
Cancel
Save