On Mon, Mar 27, 2023 at 5:03 PM Eelco Chaudron <[email protected]> wrote: > > I did not review this, but I noticed you do null checks for memset() and > memcpy(). But there are functions for this in OVS like nullable_memset() and > nullable_memcpy(), maybe some of the changes might benefit from using this. > > In addition, there is also a nullable_string_is_equal() which might be useful > in some cases.
Ah okay sure, thank you for the suggestions Eelco. I was not aware of the `nullable_` functions. I will look into them when improving this patch. On Tue, Mar 28, 2023 at 6:36 PM Ilya Maximets <[email protected]> wrote: > > I'd also say that the vast majority of changes here should > be replaced with assertions, because they are checking for > impossible conditions. For example, there should be no way > the name and tables are not set after successful parser run > in ovsdb_schema_from_json(), because they are not optional. > Explicit handling of impossible cases is confusing for readers. > Use of assertions will also reduce the patch size significantly. Got it, thank you for the suggestions Ilya. I will incorporate them into the next patch version as soon as I find time to work on it. Best regards, James Raphael Tiovalen _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
