diff options
author | Roy Marples <roy@marples.name> | 2008-01-30 15:01:37 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-01-30 15:01:37 +0000 |
commit | 84ad9a40a647b97551bc8bc35f082bd82e8b8c92 (patch) | |
tree | d73157f3e3c34ad3d55cb664cf726980a6a5ab12 /src/rc/rc.c | |
parent | 3506cb2dc737bbe5bdeaf0bcd9d239db98be1819 (diff) |
Use the variable instead of type for sizeof.
Diffstat (limited to 'src/rc/rc.c')
-rw-r--r-- | src/rc/rc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rc/rc.c b/src/rc/rc.c index f0a76396..433babbf 100644 --- a/src/rc/rc.c +++ b/src/rc/rc.c @@ -224,7 +224,7 @@ static char read_key (bool block) /* Now save our terminal settings. We need to restore them at exit as we * will be changing it for non-blocking reads for Interactive */ if (! termios_orig) { - termios_orig = xmalloc (sizeof (struct termios)); + termios_orig = xmalloc (sizeof (*termios_orig)); tcgetattr (fd, termios_orig); } @@ -401,11 +401,11 @@ static void add_pid (pid_t pid) if (sp) { while (sp->next) sp = sp->next; - sp->next = xmalloc (sizeof (pidlist_t)); + sp->next = xmalloc (sizeof (*sp->next)); sp = sp->next; } else - sp = service_pids = xmalloc (sizeof (pidlist_t)); - memset (sp, 0, sizeof (pidlist_t)); + sp = service_pids = xmalloc (sizeof (*sp)); + memset (sp, 0, sizeof (*sp)); sp->pid = pid; } |