Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
5c186dff
Commit
5c186dff
authored
Dec 06, 2010
by
Hallvard Furuseth
Browse files
Silence valgrind's ptrcheck (no real change).
Also removes a bit unnecessary code.
parent
a5d1029f
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/liblutil/ldif.c
View file @
5c186dff
...
...
@@ -790,13 +790,10 @@ ldif_read_record(
char
**
bufp
,
/* ptr to malloced output buffer */
int
*
buflenp
)
/* ptr to length of *bufp */
{
char
line
buf
[
LDIF_MAXLINE
],
*
line
,
*
nbufp
;
ber_len_t
lcur
=
0
,
len
,
linesize
;
char
line
[
LDIF_MAXLINE
],
*
nbufp
;
ber_len_t
lcur
=
0
,
len
;
int
last_ch
=
'\n'
,
found_entry
=
0
,
stop
,
top_comment
=
0
;
line
=
linebuf
;
linesize
=
sizeof
(
linebuf
);
for
(
stop
=
0
;
!
stop
;
last_ch
=
line
[
len
-
1
]
)
{
/* If we're at the end of this file, see if we should pop
* back to a previous file. (return from an include)
...
...
@@ -815,10 +812,11 @@ ldif_read_record(
if
(
stop
)
break
;
if
(
fgets
(
line
,
line
size
,
lfp
->
fp
)
==
NULL
)
{
if
(
fgets
(
line
,
size
of
(
line
)
,
lfp
->
fp
)
==
NULL
)
{
stop
=
1
;
/* Add \n in case the file does not end with newline */
line
=
"
\n
"
;
line
[
0
]
=
'\n'
;
line
[
1
]
=
'\0'
;
}
len
=
strlen
(
line
);
...
...
Write
Preview
Supports
Markdown
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