Remove redundant empty payload checks in legacy delete and insert functions

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Do
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: libmongoc
    • None
    • None
    • None
    • None
    • None
    • None

      _mongoc_write_command_delete_legacy and _mongoc_write_command_insert_legacy both check if command->n_documents is zero. This notably does not happen for the update function.

      These checks appear to be redundant due to _empty_error in mongoc-write-command.c, which applies to all write command code paths (before the protocol is chosen).

              Assignee:
              Unassigned
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: