cryptui: Avoid idempotent operation (Clang).
This commit is contained in:
parent
85051917fe
commit
61c6212672
|
@ -1966,23 +1966,19 @@ static struct OIDToString oidMap[] = {
|
||||||
|
|
||||||
static struct OIDToString *findSupportedOID(LPCSTR oid)
|
static struct OIDToString *findSupportedOID(LPCSTR oid)
|
||||||
{
|
{
|
||||||
int indexHigh = sizeof(oidMap) / sizeof(oidMap[0]) - 1, indexLow = 0, i;
|
int indexHigh = sizeof(oidMap) / sizeof(oidMap[0]) - 1, indexLow = 0;
|
||||||
struct OIDToString *ret = NULL;
|
|
||||||
|
|
||||||
for (i = (indexLow + indexHigh) / 2; !ret && indexLow <= indexHigh;
|
while (indexLow <= indexHigh)
|
||||||
i = (indexLow + indexHigh) / 2)
|
|
||||||
{
|
{
|
||||||
int cmp;
|
int cmp, i = (indexLow + indexHigh) / 2;
|
||||||
|
if (!(cmp = strcmp(oid, oidMap[i].oid)))
|
||||||
cmp = strcmp(oid, oidMap[i].oid);
|
return &oidMap[i];
|
||||||
if (!cmp)
|
if (cmp > 0)
|
||||||
ret = &oidMap[i];
|
|
||||||
else if (cmp > 0)
|
|
||||||
indexLow = i + 1;
|
indexLow = i + 1;
|
||||||
else
|
else
|
||||||
indexHigh = i - 1;
|
indexHigh = i - 1;
|
||||||
}
|
}
|
||||||
return ret;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void add_local_oid_text_to_control(HWND text, LPCSTR oid)
|
static void add_local_oid_text_to_control(HWND text, LPCSTR oid)
|
||||||
|
|
Loading…
Reference in New Issue