~vcs-imports/make/master

Viewing all changes in revision 2803.

  • Committer: Paul Smith
  • Author(s): Noah Goldstein
  • Date: 2022-04-24 21:52:54 UTC
  • Revision ID: git-v1:5690084634b507ad7427589a9525eca05d15eb4f
Replace strcmp() with memcmp() where possible

memcmp() is always faster than strcmp().  In places where we already
know that both buffers have sufficient size, replace strcmp() with
memcmp().

* src/main.c (main): Replace strncmp() with memcmp()==0.
* src/read.c (word1eq): Ditto.
* src/commands.c (set_file_variables): Ditto.
* src/function.c (func_filter_filterout): Ditto.
(a_word_hash_cmp): Use STRING_N_COMPARE since we know the length.
(func_sort): Replace strcmp() with memcmp().

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: