From: Neil Brown Date: Tue, 14 Jun 2005 06:33:16 +0000 (+0000) Subject: Fix a few typecasts X-Git-Tag: mdadm-2.0-devel-2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a46f4061d3b35e101651a764582186e5f89b2bea;p=thirdparty%2Fmdadm.git Fix a few typecasts Signed-off-by: Neil Brown --- diff --git a/ChangeLog b/ChangeLog index 8fdb46fe..6e55e62c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/util.c b/util.c index 05362c7a..c349df8d 100644 --- a/util.c +++ b/util.c @@ -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;