]> diplodocus.org Git - nmh/commit
Hoick FENDNULL(key) out of the search loop.
authorRalph Corderoy <ralph@inputplus.co.uk>
Tue, 12 Sep 2017 14:02:41 +0000 (15:02 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Tue, 12 Sep 2017 14:13:26 +0000 (15:13 +0100)
commit459c5e3d66287e314dff8543df32c6c14a8464c6
treec9d60ef6c24a6d463aa8b126651d0a7fd5b24f52
parentb080f5bec1263d354ca4943e2bc9670cb1e9cfa7
Hoick FENDNULL(key) out of the search loop.

`key' is a loop-invariant so can be tested for NULL once before the
loop.  In one case, this also avoid passing NULL to printf(3) for "%s",
and means getcpy()s can be replaced with mh_xstrdup()s.
sbr/context_del.c
sbr/context_find.c
sbr/context_replace.c
uip/post.c