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
7c29e2c7
Commit
7c29e2c7
authored
Nov 23, 2010
by
Hallvard Furuseth
Browse files
ITS#6723: Handle EOF in test programs
parent
def5d26f
Changes
2
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/dntest.c
View file @
7c29e2c7
...
...
@@ -81,11 +81,9 @@ main( int argc, char *argv[] )
}
if
(
strcmp
(
argv
[
1
],
"-"
)
==
0
)
{
size_t
len
;
fgets
(
buf
,
sizeof
(
buf
),
stdin
);
len
=
strlen
(
buf
);
if
(
len
>
0
&&
buf
[
--
len
]
==
'\n'
)
{
size_t
len
=
fgets
(
buf
,
sizeof
(
buf
),
stdin
)
?
strlen
(
buf
)
:
0
;
if
(
len
==
0
||
buf
[
--
len
]
==
'\n'
)
{
buf
[
len
]
=
'\0'
;
}
strin
=
buf
;
...
...
@@ -296,4 +294,3 @@ main( int argc, char *argv[] )
return
(
0
);
}
tests/progs/slapd-tester.c
View file @
7c29e2c7
...
...
@@ -990,7 +990,8 @@ get_search_filters( char *filename, char *filters[], char *attrs[], char *bases[
}
else
{
bases
[
filter
]
=
ArgDup
(
line
);
}
fgets
(
line
,
BUFSIZ
,
fp
);
if
(
fgets
(
line
,
BUFSIZ
,
fp
)
==
NULL
)
*
line
=
'\0'
;
if
((
nl
=
strchr
(
line
,
'\r'
))
||
(
nl
=
strchr
(
line
,
'\n'
)))
*
nl
=
'\0'
;
...
...
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