summaryrefslogtreecommitdiff
path: root/src/rc/mountinfo.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-30 15:01:37 +0000
committerRoy Marples <roy@marples.name>2008-01-30 15:01:37 +0000
commit84ad9a40a647b97551bc8bc35f082bd82e8b8c92 (patch)
treed73157f3e3c34ad3d55cb664cf726980a6a5ab12 /src/rc/mountinfo.c
parent3506cb2dc737bbe5bdeaf0bcd9d239db98be1819 (diff)
downloadopenrc-84ad9a40a647b97551bc8bc35f082bd82e8b8c92.tar.gz
openrc-84ad9a40a647b97551bc8bc35f082bd82e8b8c92.tar.bz2
openrc-84ad9a40a647b97551bc8bc35f082bd82e8b8c92.tar.xz
Use the variable instead of type for sizeof.
Diffstat (limited to 'src/rc/mountinfo.c')
-rw-r--r--src/rc/mountinfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c
index 7dc7d06..0d8d7a1 100644
--- a/src/rc/mountinfo.c
+++ b/src/rc/mountinfo.c
@@ -319,7 +319,7 @@ static char **find_mounts (struct args *args)
static regex_t *get_regex (const char *string)
{
- regex_t *reg = xmalloc (sizeof (regex_t));
+ regex_t *reg = xmalloc (sizeof (*reg));
int result;
char buffer[256];
@@ -390,7 +390,7 @@ int mountinfo (int argc, char **argv)
#define REG_FREE(_var) \
if (_var) { regfree (_var); free (_var); }
- memset (&args, 0, sizeof (struct args));
+ memset (&args, 0, sizeof (args));
args.mount_type = mount_to;
args.netdev = net_ignore;