Skip to content

Commit de1733f

Browse files
committed
Using single line else if
1 parent 0649575 commit de1733f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/rlookup.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -987,14 +987,12 @@ void RLookupRow_WriteFieldsFrom(const RLookupRow *srcRow, const RLookup *srcLook
987987
RLookupKey *dest_key = RLookup_FindKey(destLookup, src_key->name, src_key->name_len);
988988
if (!createMissingKeys) {
989989
RS_ASSERT(dest_key != NULL); // Assumption: all source keys exist in destination
990-
} else {
991-
if (!dest_key) {
990+
} else if (!dest_key) {
992991
// Key doesn't exist in destination - create it on demand.
993992
// This can happen with LOAD * where keys are created dynamically.
994993
// Inherit non-transient flags from source.
995994
uint32_t flags = src_key->flags & ~RLOOKUP_TRANSIENT_FLAGS;
996995
dest_key = RLookup_GetKey_WriteEx(destLookup, src_key->name, src_key->name_len, flags);
997-
}
998996
}
999997
// Write fields to destination (increments refcount, shares ownership)
1000998
RLookup_WriteKey(dest_key, destRow, value);

0 commit comments

Comments
 (0)