Fix a few typecasts

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
This commit is contained in:
Neil Brown 2005-06-14 06:33:16 +00:00
parent 1337546dc1
commit a46f4061d3
2 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ Changes Prior to this release
- Allow --auto command line option to set default auto=
value when running "--assemble --scan". Previously
--auto was ignored if --scan was given
- Fix a few type casts
Changes Prior to 1.11.0 release
- Fix embarassing bug which causes --add to always fail.

4
util.c
View File

@ -195,8 +195,8 @@ int check_reiser(int fd, char *name)
return 0;
if (read(fd, sb, 1024) != 1024)
return 0;
if (strncmp(sb+52, "ReIsErFs",8)!=0 &&
strncmp(sb+52, "ReIsEr2Fs",9)!=0)
if (strncmp((char*)sb+52, "ReIsErFs",8)!=0 &&
strncmp((char*)sb+52, "ReIsEr2Fs",9)!=0)
return 0;
fprintf(stderr, Name ": %s appears to contain a reiserfs file system\n",name);
size = sb[0]|(sb[1]|(sb[2]|sb[3]<<8)<<8)<<8;