mirror of
https://github.com/team-infusion-developers/android_hardware_samsung.git
synced 2024-11-06 21:55:41 +00:00
macloader: Close file when we don't need it anymore.
Change-Id: Ib539b45ed45f1dcfc9eea0475adb9c50d17011b5 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
parent
7558b9dda2
commit
3a73bd3f2e
1 changed files with 1 additions and 1 deletions
|
@ -60,6 +60,7 @@ int main() {
|
||||||
|
|
||||||
/* get and compare mac addr */
|
/* get and compare mac addr */
|
||||||
str = fgets(mac_addr_half, 9, file);
|
str = fgets(mac_addr_half, 9, file);
|
||||||
|
fclose(file);
|
||||||
if (str == 0) {
|
if (str == 0) {
|
||||||
fprintf(stderr, "fgets() from file %s failed\n", MACADDR_PATH);
|
fprintf(stderr, "fgets() from file %s failed\n", MACADDR_PATH);
|
||||||
ALOGE("Can't read from %s\n", MACADDR_PATH);
|
ALOGE("Can't read from %s\n", MACADDR_PATH);
|
||||||
|
@ -203,6 +204,5 @@ int main() {
|
||||||
ALOGD("Deleting file %s\n", CID_PATH);
|
ALOGD("Deleting file %s\n", CID_PATH);
|
||||||
remove(CID_PATH);
|
remove(CID_PATH);
|
||||||
}
|
}
|
||||||
fclose(file);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue