cvs commit: ALFS/nALFS/src options.c

kpfleming at linuxfromscratch.org kpfleming at linuxfromscratch.org
Mon Nov 3 15:20:11 PST 2003


kpfleming    03/11/03 16:20:11

  Modified:    nALFS/src options.c
  Log:
  add const modifiers to opt_* pointers inside options.c
  
  Revision  Changes    Path
  1.7       +4 -4      ALFS/nALFS/src/options.c
  
  Index: options.c
  ===================================================================
  RCS file: /home/cvsroot/ALFS/nALFS/src/options.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- options.c	3 Nov 2003 22:12:18 -0000	1.6
  +++ options.c	3 Nov 2003 23:20:11 -0000	1.7
  @@ -43,28 +43,28 @@
   			.type = O_STRING, \
   			.def_value.str_value = opt_def_value \
   		}; \
  -		STRING *opt_##opt_name = &real_opt_##opt_name .value.str_value;
  +		STRING * const opt_##opt_name = &real_opt_##opt_name .value.str_value;
   #define BOOL_OPTION(opt_name, opt_def_value) \
   		static struct option_s real_opt_##opt_name = { \
   			.name = #opt_name, \
   			.type = O_BOOL, \
   			.def_value.bool_value = opt_def_value \
   		}; \
  -		BOOL *opt_##opt_name = &real_opt_##opt_name .value.bool_value;
  +		BOOL * const opt_##opt_name = &real_opt_##opt_name .value.bool_value;
   #define NUMBER_OPTION(opt_name, opt_def_value) \
   		static struct option_s real_opt_##opt_name = { \
   			.name = #opt_name, \
   			.type = O_NUMBER, \
   			.def_value.num_value = opt_def_value \
   		}; \
  -		NUMBER *opt_##opt_name = &real_opt_##opt_name .value.num_value;
  +		NUMBER * const opt_##opt_name = &real_opt_##opt_name .value.num_value;
   #define COMMAND_OPTION(opt_name, opt_def_value) \
   		static struct option_s real_opt_##opt_name = { \
   			.name = #opt_name, \
   			.type = O_COMMAND, \
   			.def_value.str_value = opt_def_value \
   		}; \
  -		STRING *opt_##opt_name = &real_opt_##opt_name .value.str_value;
  +		STRING * const opt_##opt_name = &real_opt_##opt_name .value.str_value;
   
   #include "options.h"
   #include "option-list.h"
  
  
  



More information about the alfs-log mailing list