Guo Wenxue
2018-10-25 888ddc5021aa8032ac0472a696a20a632c717910
Update ds18b20.c, add close(fd)
3 files modified
6 ■■■■■ changed files
apue/1.File_IO/ds18b20.c 2 ●●●●● patch | view | raw | blame | history
apue/2.Socket/ds18b20.c 2 ●●●●● patch | view | raw | blame | history
modules/c/ds18b20.c 2 ●●●●● patch | view | raw | blame | history
apue/1.File_IO/ds18b20.c
@@ -116,5 +116,7 @@
    /* convert string value to float value */
    *temp = atof(ptr)/1000;
   
    close(fd);
    return 0;
}
apue/2.Socket/ds18b20.c
@@ -98,5 +98,7 @@
    /* convert string value to float value */
    *temp = atof(ptr)/1000;
   
    close(fd);
    return 0;
}
modules/c/ds18b20.c
@@ -116,5 +116,7 @@
    /* convert string value to float value */
    *temp = atof(ptr)/1000;
   
    close(fd);
    return 0;
}