mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(new_item, record_relation): Use `sizeof *var' rather
than `sizeof EXPLICIT_TYPE'. The former is more maintainable and usually shorter.
This commit is contained in:
1 parent
55760c106b
commit
0abb38e587
1 file changed
+2
-2
+2
-2
@@ -111,7 +111,7 @@ With no FILE, or when FILE is -, read standard input.\n\
|
||||
static struct item *
|
||||
new_item (const char *str)
|
||||
{
|
||||
struct item *k = xmalloc (sizeof (struct item));
|
||||
struct item *k = xmalloc (sizeof *k);
|
||||
|
||||
k->str = (str ? xstrdup (str): NULL);
|
||||
k->left = k->right = NULL;
|
||||
@@ -286,7 +286,7 @@ record_relation (struct item *j, struct item *k)
|
||||
if (!STREQ (j->str, k->str))
|
||||
{
|
||||
k->count++;
|
||||
p = xmalloc (sizeof (struct successor));
|
||||
p = xmalloc (sizeof *p);
|
||||
p->suc = k;
|
||||
p->next = j->top;
|
||||
j->top = p;
|
||||
|
||||
Reference in new issue
Block a user