On 9/23/21 1:00 AM, Ilya Maximets wrote: >>> I was wondering if it makes sense to factor out the common part of >>> ovsdb_datum_added_removed() and ovsdb_datum_diff(). It seems to me that >>> ovsdb_datum_diff(diff, old, new, type) is almost the same as >>> ovsdb_datum_added_removed(diff, diff, old, new, type), we just need to >>> handle the non-composite types separately and deal with the case when >>> 'added' == 'new' if we detect a value changing for a given key. > > I thought about this and it would be great to reduce some code duplication. > But I found dealing with corner cases inside he function a bit awkward. > Especially the part where we need to check that 'added' == 'new' and add > only one of the values to one of the sets and not touch the other one.
I agree, it's not that pretty. > So, I kept it as is for now. > Sounds good to me, thanks! _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
