projects
/
platform
/
upstream
/
mtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump to 4.0.43
[platform/upstream/mtools.git]
/
read_dword.h
diff --git
a/read_dword.h
b/read_dword.h
index
0803bd8
..
56820b1
100644
(file)
--- a/
read_dword.h
+++ b/
read_dword.h
@@
-18,20
+18,20
@@
* along with Mtools. If not, see <http://www.gnu.org/licenses/>.
*/
* along with Mtools. If not, see <http://www.gnu.org/licenses/>.
*/
-static
Dword read_dword(int handle)
+static
inline Dword read_dword(int handle)
{
Byte val[4];
{
Byte val[4];
-
+
if(read(handle, (char *)val, 4) < 4)
return (Dword) -1;
return byte2dword(val);
}
if(read(handle, (char *)val, 4) < 4)
return (Dword) -1;
return byte2dword(val);
}
-
UNUSED(static int32_t read_sdword(int handle)
)
+
static inline int32_t read_sdword(int handle
)
{
Byte val[4];
{
Byte val[4];
-
+
if(read(handle, (char *)val, 4) < 4)
return (int32_t) -1;
if(read(handle, (char *)val, 4) < 4)
return (int32_t) -1;
@@
-40,11
+40,11
@@
UNUSED(static int32_t read_sdword(int handle))
struct SQwordRet { int64_t v; int err; };
struct SQwordRet { int64_t v; int err; };
-
UNUSED(static struct SQwordRet read_sqword(int handle)
)
+
static inline struct SQwordRet read_sqword(int handle
)
{
Byte val[8];
struct SQwordRet ret;
{
Byte val[8];
struct SQwordRet ret;
-
+
if(read(handle, (char *)val, 8) < 8) {
ret.err=-1;
} else {
if(read(handle, (char *)val, 8) < 8) {
ret.err=-1;
} else {