Skip to content

Commit

Permalink
Use corresponding struct name in memset size to clear the whole area.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 authored and ljanyst committed Jun 6, 2013
1 parent 8ccb3b0 commit 9a73316
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/XrdPosix/XrdPosixPreload32.cc
Expand Up @@ -488,7 +488,7 @@ int statfs( const char *path, struct statfs *buf)
int rc;

if ((rc = XrdPosix_Statfs(path, (struct statfs *)&buf64))) return rc;
memset(buf, 0, sizeof(buf));
memset(buf, 0, sizeof(struct statfs));
buf->f_type = buf64.f_type;
buf->f_bsize = buf64.f_bsize;
buf->f_blocks = buf64.f_blocks;
Expand All @@ -515,7 +515,7 @@ int statvfs( const char *path, struct statvfs *buf)
struct statvfs64 buf64;
int rc;
if ((rc = XrdPosix_Statvfs(path, (struct statvfs *)&buf64))) return rc;
memset(buf, 0, sizeof(buf));
memset(buf, 0, sizeof(struct statvfs));
buf->f_flag = buf64.f_flag;
buf->f_bsize = buf64.f_bsize;
buf->f_blocks = buf64.f_blocks;
Expand Down

0 comments on commit 9a73316

Please sign in to comment.