Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
einsteinathome
boinc
Commits
cbe3e29e
Commit
cbe3e29e
authored
Oct 12, 2015
by
David Anderson
Browse files
Merge pull request #1405 from serval2412/master
cppcheck: fix 1 kind of reports
parents
428d19f3
efdc5601
Changes
3
Hide whitespace changes
Inline
Side-by-side
dcapi/condor/condor_utils.c
View file @
cbe3e29e
...
@@ -173,7 +173,7 @@ _DC_get_file(char *fn)
...
@@ -173,7 +173,7 @@ _DC_get_file(char *fn)
if
((
f
=
fopen
(
fn
,
"r"
))
!=
NULL
)
if
((
f
=
fopen
(
fn
,
"r"
))
!=
NULL
)
{
{
int
bs
=
100
,
i
;
int
bs
=
100
,
i
;
char
c
;
int
c
;
buf
=
malloc
(
bs
);
buf
=
malloc
(
bs
);
i
=
0
;
i
=
0
;
...
@@ -185,10 +185,10 @@ _DC_get_file(char *fn)
...
@@ -185,10 +185,10 @@ _DC_get_file(char *fn)
bs
+=
100
;
bs
+=
100
;
buf
=
realloc
(
buf
,
bs
);
buf
=
realloc
(
buf
,
bs
);
}
}
buf
[
i
]
=
c
;
buf
[
i
]
=
(
char
)
c
;
i
++
;
i
++
;
buf
[
i
]
=
'\0'
;
}
}
buf
[
i
]
=
'\0'
;
fclose
(
f
);
fclose
(
f
);
}
}
return
(
buf
);
return
(
buf
);
...
@@ -363,7 +363,7 @@ _DC_read_message(char *box, char *name, int del_msg)
...
@@ -363,7 +363,7 @@ _DC_read_message(char *box, char *name, int del_msg)
if
((
f
=
fopen
(
fn
,
"r"
))
!=
NULL
)
if
((
f
=
fopen
(
fn
,
"r"
))
!=
NULL
)
{
{
int
bs
=
100
,
i
;
int
bs
=
100
,
i
;
char
c
;
int
c
;
buf
=
malloc
(
bs
);
buf
=
malloc
(
bs
);
i
=
0
;
i
=
0
;
...
@@ -375,10 +375,10 @@ _DC_read_message(char *box, char *name, int del_msg)
...
@@ -375,10 +375,10 @@ _DC_read_message(char *box, char *name, int del_msg)
bs
+=
100
;
bs
+=
100
;
buf
=
realloc
(
buf
,
bs
);
buf
=
realloc
(
buf
,
bs
);
}
}
buf
[
i
]
=
c
;
buf
[
i
]
=
(
char
)
c
;
i
++
;
i
++
;
buf
[
i
]
=
'\0'
;
}
}
buf
[
i
]
=
'\0'
;
fclose
(
f
);
fclose
(
f
);
if
(
del_msg
)
if
(
del_msg
)
unlink
(
fn
);
unlink
(
fn
);
...
...
dcapi/condor/tc.c
View file @
cbe3e29e
...
@@ -32,7 +32,7 @@ get_file(char *fn)
...
@@ -32,7 +32,7 @@ get_file(char *fn)
if
((
f
=
fopen
(
fn
,
"r"
))
!=
NULL
)
if
((
f
=
fopen
(
fn
,
"r"
))
!=
NULL
)
{
{
int
bs
=
100
,
i
;
int
bs
=
100
,
i
;
char
c
;
int
c
;
buf
=
malloc
(
bs
);
buf
=
malloc
(
bs
);
i
=
0
;
i
=
0
;
...
@@ -44,10 +44,10 @@ get_file(char *fn)
...
@@ -44,10 +44,10 @@ get_file(char *fn)
bs
+=
100
;
bs
+=
100
;
buf
=
realloc
(
buf
,
bs
);
buf
=
realloc
(
buf
,
bs
);
}
}
buf
[
i
]
=
c
;
buf
[
i
]
=
(
char
)
c
;
i
++
;
i
++
;
buf
[
i
]
=
'\0'
;
}
}
buf
[
i
]
=
'\0'
;
fclose
(
f
);
fclose
(
f
);
}
}
return
(
buf
);
return
(
buf
);
...
...
dcapi/local/local_utils.c
View file @
cbe3e29e
...
@@ -177,7 +177,7 @@ _DC_get_file(char *fn)
...
@@ -177,7 +177,7 @@ _DC_get_file(char *fn)
if
((
f
=
fopen
(
fn
,
"r"
))
!=
NULL
)
if
((
f
=
fopen
(
fn
,
"r"
))
!=
NULL
)
{
{
int
bs
=
100
,
i
;
int
bs
=
100
,
i
;
char
c
;
int
c
;
buf
=
malloc
(
bs
);
buf
=
malloc
(
bs
);
i
=
0
;
i
=
0
;
...
@@ -189,10 +189,10 @@ _DC_get_file(char *fn)
...
@@ -189,10 +189,10 @@ _DC_get_file(char *fn)
bs
+=
100
;
bs
+=
100
;
buf
=
realloc
(
buf
,
bs
);
buf
=
realloc
(
buf
,
bs
);
}
}
buf
[
i
]
=
c
;
buf
[
i
]
=
(
char
)
c
;
i
++
;
i
++
;
buf
[
i
]
=
'\0'
;
}
}
buf
[
i
]
=
'\0'
;
fclose
(
f
);
fclose
(
f
);
}
}
return
(
buf
);
return
(
buf
);
...
@@ -367,7 +367,7 @@ _DC_read_message(char *box, char *name, int del_msg)
...
@@ -367,7 +367,7 @@ _DC_read_message(char *box, char *name, int del_msg)
if
((
f
=
fopen
(
fn
,
"r"
))
!=
NULL
)
if
((
f
=
fopen
(
fn
,
"r"
))
!=
NULL
)
{
{
int
bs
=
100
,
i
;
int
bs
=
100
,
i
;
char
c
;
int
c
;
buf
=
malloc
(
bs
);
buf
=
malloc
(
bs
);
i
=
0
;
i
=
0
;
...
@@ -379,10 +379,10 @@ _DC_read_message(char *box, char *name, int del_msg)
...
@@ -379,10 +379,10 @@ _DC_read_message(char *box, char *name, int del_msg)
bs
+=
100
;
bs
+=
100
;
buf
=
realloc
(
buf
,
bs
);
buf
=
realloc
(
buf
,
bs
);
}
}
buf
[
i
]
=
c
;
buf
[
i
]
=
(
char
)
c
;
i
++
;
i
++
;
buf
[
i
]
=
'\0'
;
}
}
buf
[
i
]
=
'\0'
;
fclose
(
f
);
fclose
(
f
);
if
(
del_msg
)
if
(
del_msg
)
unlink
(
fn
);
unlink
(
fn
);
...
...
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