Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
9eec37c4
Commit
9eec37c4
authored
Apr 24, 2014
by
Hisham Muhammad
Browse files
More sanity checks.
parent
27da00f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
BatteryMeter.c
View file @
9eec37c4
...
...
@@ -85,9 +85,10 @@ static unsigned long int parseBatInfo(const char *fileName, const unsigned short
break
;
}
char
line
[
50
];
char
line
[
50
]
=
""
;
for
(
unsigned
short
int
i
=
0
;
i
<
lineNum
;
i
++
)
{
fgets
(
line
,
sizeof
line
,
file
);
char
*
ok
=
fgets
(
line
,
sizeof
line
,
file
);
if
(
!
ok
)
break
;
}
fclose
(
file
);
...
...
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