Projects
Factory:RISC-V:Base
cracklib
_service:tar_scm:backport-cracklib-2.9.6-lookup...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-cracklib-2.9.6-lookup.patch of Package cracklib
diff -up cracklib-2.9.6/lib/packlib.c.lookup cracklib-2.9.6/lib/packlib.c --- cracklib-2.9.6/lib/packlib.c.lookup 2018-10-10 14:19:06.988958835 +0200 +++ cracklib-2.9.6/lib/packlib.c 2018-11-26 16:04:34.648256614 +0100 @@ -585,12 +585,11 @@ fprintf(stderr, "look for (%s)\n", strin fprintf(stderr, "---- %lu, %lu ----\n", lwm, hwm); #endif - middle = lwm + ((hwm - lwm + 1) / 2); - for (;;) { int cmp; + middle = lwm + ((hwm - lwm + 1) / 2); #if DEBUG fprintf(stderr, "lwm = %lu, middle = %lu, hwm = %lu\n", lwm, middle, hwm); @@ -617,24 +616,28 @@ fprintf(stderr, "look for (%s)\n", strin return(middle); } - if (middle == hwm) - { -#if DEBUG - fprintf(stderr, "at terminal subdivision, stopping search\n"); -#endif - break; - } - if (cmp < 0) { - hwm = middle; - middle = lwm + ((hwm - lwm ) / 2); - } + if (middle == lwm) + { +#if DEBUG + fprintf(stderr, "at terminal subdivision from right, stopping search\n"); +#endif + break; + } + hwm = middle - 1; + } else if (cmp > 0) { - lwm = middle; - middle = lwm + ((hwm - lwm + 1) / 2); - } + if (middle == hwm) + { +#if DEBUG + fprintf(stderr, "at terminal subdivision from left, stopping search\n"); +#endif + break; + } + lwm = middle + 1; + } } return (PW_WORDS(pwp));
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2