Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trackrdrd
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
trackrdrd
Commits
4378e988
Commit
4378e988
authored
Jun 19, 2014
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_config: printing strings to files simplified
parent
98612336
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
test_config.c
trackrdrd/src/test/test_config.c
+2
-9
No files found.
trackrdrd/src/test/test_config.c
View file @
4378e988
...
@@ -61,7 +61,7 @@ char verbose_buffer[9000];
...
@@ -61,7 +61,7 @@ char verbose_buffer[9000];
/***** functions **************************************************************/
/***** functions **************************************************************/
static
char
*
static
c
onst
c
har
*
getConfigContent
(
void
)
getConfigContent
(
void
)
{
{
int
i
=
0
;
int
i
=
0
;
...
@@ -96,20 +96,13 @@ static int
...
@@ -96,20 +96,13 @@ static int
saveConfig
(
const
char
*
fname
)
saveConfig
(
const
char
*
fname
)
{
{
FILE
*
fp
;
FILE
*
fp
;
char
*
content
;
fp
=
fopen
(
fname
,
"w"
);
fp
=
fopen
(
fname
,
"w"
);
if
(
fp
==
NULL
)
{
if
(
fp
==
NULL
)
{
perror
(
fname
);
perror
(
fname
);
return
4
;
return
4
;
}
}
content
=
getConfigContent
();
fprintf
(
fp
,
getConfigContent
());
for
(
int
i
=
0
;
*
(
content
+
i
)
!=
0
;
i
++
)
{
if
(
EOF
==
putc
(
*
(
content
+
i
),
fp
))
{
fclose
(
fp
);
return
8
;
}
}
fclose
(
fp
);
fclose
(
fp
);
return
0
;
return
0
;
}
}
...
...
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