[PATCH 1/2] env: use getopt_long instead of getopt32long

Csókás Bence csokas.bence at prolan.hu
Mon Apr 7 13:12:50 UTC 2025


Hi,

On 2025. 04. 07. 12:08, Marc Kewitz wrote:
> +	while ((optc = getopt_long(argc, argv, short_options, long_options, NULL)) != -1) {
> +		switch (optc)
> +		{
> +		case 'i':
> +			ignore_environment = true;
> +			break;
> +		case 'u':
> +			add_unset_var(optarg);

Is it guaranteed that the memory pointed to by `optarg` will not change 
after consecutive calls to `getopt*()`? I don't see it specified either 
way in the man page.

Bence



More information about the busybox mailing list