Re: [dev] [utmp][PATCH] Use same die() call in parent and child
Roberto E. Vargas Caballero wrote:
> _AT_@ -41,6 +41,7 @@ main(int argc, char *argv[])
> + char *err;
> _AT_@ -58,15 +59,16 @@ main(int argc, char *argv[])
> + err = "error spawning child:%s";
Heyho Roberto,
why not immediately initialize the variable?
> - die("error executing shell:%s", strerror(errno));
> + err = "error executing shell:%s" ;
> case -1:
> - die("error spawning child:%s", strerror(errno));
> + die(err, strerror(errno));
Also I think this (unmarked!) fallthrough way harder to grasp at the first
glance. What benefit at all do we get from the patch?
--Markus
Received on Thu Aug 07 2014 - 16:29:51 CEST
This archive was generated by hypermail 2.3.0
: Thu Aug 07 2014 - 16:36:07 CEST