]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): Use `sizeof *var' rather than `sizeof EXPLICIT_TYPE'.
authorJim Meyering <jim@meyering.net>
Tue, 4 Nov 2003 06:13:55 +0000 (06:13 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 4 Nov 2003 06:13:55 +0000 (06:13 +0000)
The former is more maintainable and usually shorter.

src/od.c

index 257ea43b38c0092f7b366b5e8578b933120ed815..7e03611f54834fcd7d0d1a7a31f943294889d328 100644 (file)
--- a/src/od.c
+++ b/src/od.c
@@ -1667,7 +1667,7 @@ main (int argc, char **argv)
 
   n_specs = 0;
   n_specs_allocated = 5;
-  spec = xmalloc (n_specs_allocated * sizeof (struct tspec));
+  spec = xmalloc (n_specs_allocated * sizeof *spec);
 
   format_address = format_address_std;
   address_base = 8;