Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
699fb02d
Commit
699fb02d
authored
Oct 14, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Oct 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetmib1: Avoid idempotent operation in findSupportedQuery function (Clang).
parent
29b52fa5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
main.c
dlls/inetmib1/main.c
+8
-11
No files found.
dlls/inetmib1/main.c
View file @
699fb02d
...
...
@@ -1342,29 +1342,26 @@ static void cleanup(void)
static
struct
mibImplementation
*
findSupportedQuery
(
UINT
*
ids
,
UINT
idLength
,
UINT
*
matchingIndex
)
{
int
indexHigh
=
DEFINE_SIZEOF
(
supportedIDs
)
-
1
,
indexLow
=
0
,
i
;
struct
mibImplementation
*
impl
=
NULL
;
int
indexHigh
=
DEFINE_SIZEOF
(
supportedIDs
)
-
1
,
indexLow
=
0
;
AsnObjectIdentifier
oid1
=
{
idLength
,
ids
};
if
(
!
idLength
)
return
NULL
;
for
(
i
=
(
indexLow
+
indexHigh
)
/
2
;
!
impl
&&
indexLow
<=
indexHigh
;
i
=
(
indexLow
+
indexHigh
)
/
2
)
{
INT
cmp
;
cmp
=
SnmpUtilOidNCmp
(
&
oid1
,
&
supportedIDs
[
i
].
name
,
idLength
);
if
(
!
cmp
)
while
(
indexLow
<=
indexHigh
)
{
INT
cmp
,
i
=
(
indexLow
+
indexHigh
)
/
2
;
if
(
!
(
cmp
=
SnmpUtilOidNCmp
(
&
oid1
,
&
supportedIDs
[
i
].
name
,
idLength
)))
{
impl
=
&
supportedIDs
[
i
];
*
matchingIndex
=
i
;
return
&
supportedIDs
[
i
];
}
else
if
(
cmp
>
0
)
if
(
cmp
>
0
)
indexLow
=
i
+
1
;
else
indexHigh
=
i
-
1
;
}
return
impl
;
return
NULL
;
}
/*****************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment