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
3108e360
Commit
3108e360
authored
May 16, 2008
by
Juan Lang
Committed by
Alexandre Julliard
May 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snmpapi: Test and correct SnmpUtilOidNCmp when count is less than Oid length.
parent
a96e118d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
main.c
dlls/snmpapi/main.c
+1
-0
util.c
dlls/snmpapi/tests/util.c
+5
-0
No files found.
dlls/snmpapi/main.c
View file @
3108e360
...
...
@@ -356,6 +356,7 @@ INT WINAPI SnmpUtilOidNCmp(AsnObjectIdentifier *oid1, AsnObjectIdentifier *oid2,
if
(
oid1
->
ids
[
i
]
>
oid2
->
ids
[
i
])
return
1
;
if
(
oid1
->
ids
[
i
]
<
oid2
->
ids
[
i
])
return
-
1
;
}
if
(
i
==
count
)
return
0
;
if
(
oid1
->
idLength
<
oid2
->
idLength
)
return
-
1
;
if
(
oid1
->
idLength
>
oid2
->
idLength
)
return
1
;
return
0
;
...
...
dlls/snmpapi/tests/util.c
View file @
3108e360
...
...
@@ -330,6 +330,11 @@ static void test_SnmpUtilOidNCmp(void)
ok
(
ret
==
1
,
"SnmpUtilOidNCmp failed: %d
\n
"
,
ret
);
ret
=
SnmpUtilOidNCmp
(
&
oid1
,
&
oid2
,
4
);
ok
(
ret
==
-
1
,
"SnmpUtilOidNCmp failed: %d
\n
"
,
ret
);
ret
=
SnmpUtilOidNCmp
(
&
oid1
,
&
oid2
,
2
);
ok
(
!
ret
,
"SnmpUtilOidNCmp failed: %d
\n
"
,
ret
);
ret
=
SnmpUtilOidNCmp
(
&
oid2
,
&
oid1
,
2
);
ok
(
!
ret
,
"SnmpUtilOidNCmp failed: %d
\n
"
,
ret
);
}
static
void
test_SnmpUtilOidCmp
(
void
)
...
...
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