Date: Fri, 7 Nov 2014 00:10:07 GMT From: John-Mark Gurney <jmg@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 1202583 for review Message-ID: <201411070010.sA70A7h3006027@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@1202583?ac=10 Change 1202583 by jmg@jmg_carbon2 on 2014/11/07 00:09:40 simplify this loop a little bit.. the double return bothered me... Sponsored by: FreeBSD Foundation Sponsored by: Netgate Affected files ... .. //depot/projects/opencrypto/sys/opencrypto/crypto.c#3 edit Differences ... ==== //depot/projects/opencrypto/sys/opencrypto/crypto.c#3 (text+ko) ==== @@ -372,9 +372,8 @@ best = cap; } } - if (best != NULL) - return best; - if (match == CRYPTOCAP_F_HARDWARE && (flags & CRYPTOCAP_F_SOFTWARE)) { + if (best == NULL && match == CRYPTOCAP_F_HARDWARE && + (flags & CRYPTOCAP_F_SOFTWARE)) { /* sort of an Algol 68-style for loop */ match = CRYPTOCAP_F_SOFTWARE; goto again;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411070010.sA70A7h3006027>