Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
c07c58d7
Commit
c07c58d7
authored
May 30, 2016
by
Lasse Karstensen
Committed by
Pål Hermunn Johansen
Jun 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove implicit line feed when using formatfile.
Fixes: #1967
parent
d5a3959d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
varnishncsa.c
bin/varnishncsa/varnishncsa.c
+5
-1
No files found.
bin/varnishncsa/varnishncsa.c
View file @
c07c58d7
...
@@ -1104,12 +1104,14 @@ read_format(const char *formatfile)
...
@@ -1104,12 +1104,14 @@ read_format(const char *formatfile)
{
{
FILE
*
fmtfile
;
FILE
*
fmtfile
;
size_t
len
=
0
;
size_t
len
=
0
;
int
fmtlen
;
char
*
fmt
=
NULL
;
char
*
fmt
=
NULL
;
fmtfile
=
fopen
(
formatfile
,
"r"
);
fmtfile
=
fopen
(
formatfile
,
"r"
);
if
(
fmtfile
==
NULL
)
if
(
fmtfile
==
NULL
)
VUT_Error
(
1
,
"Can't open format file (%s)"
,
strerror
(
errno
));
VUT_Error
(
1
,
"Can't open format file (%s)"
,
strerror
(
errno
));
if
(
getline
(
&
fmt
,
&
len
,
fmtfile
)
==
-
1
)
{
fmtlen
=
getline
(
&
fmt
,
&
len
,
fmtfile
);
if
(
fmtlen
==
-
1
)
{
free
(
fmt
);
free
(
fmt
);
if
(
feof
(
fmtfile
))
if
(
feof
(
fmtfile
))
VUT_Error
(
1
,
"Empty format file"
);
VUT_Error
(
1
,
"Empty format file"
);
...
@@ -1118,6 +1120,8 @@ read_format(const char *formatfile)
...
@@ -1118,6 +1120,8 @@ read_format(const char *formatfile)
strerror
(
errno
));
strerror
(
errno
));
}
}
fclose
(
fmtfile
);
fclose
(
fmtfile
);
if
(
fmt
[
fmtlen
-
1
]
==
'\n'
)
fmt
[
fmtlen
-
1
]
=
'\0'
;
return
(
fmt
);
return
(
fmt
);
}
}
...
...
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