Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
e87a9105
Commit
e87a9105
authored
Mar 12, 2013
by
yb9976
Browse files
Fixed off-by-one error in pdeq_putl.
parent
486b710d
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/adt/pdeq.c
View file @
e87a9105
...
...
@@ -211,7 +211,6 @@ pdeq *pdeq_putr(pdeq *dq, const void *x)
pdeq
*
pdeq_putl
(
pdeq
*
dq
,
const
void
*
x
)
{
pdeq
*
ldq
;
size_t
p
;
VRFY
(
dq
);
...
...
@@ -237,13 +236,12 @@ pdeq *pdeq_putl(pdeq *dq, const void *x)
}
ldq
->
n
++
;
if
(
ldq
->
p
==
0
)
size_t
p
=
ldq
->
p
;
if
(
p
==
0
)
p
=
NDATA
;
else
p
=
ldq
->
p
-
1
;
ldq
->
p
=
p
;
ldq
->
data
[
p
]
=
x
;
ldq
->
data
[
--
p
]
=
x
;
ldq
->
p
=
p
;
VRFY
(
dq
);
return
dq
;
...
...
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