Changeset - ebd772187f45
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-10-14 19:24:55
ohnobinki@ohnopublishing.net
fix getopt usage: signed/unsigned char
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/common/options.c
Show inline comments
 
@@ -43,25 +43,25 @@ struct options_common_data
 
 */
 
int options_init(int argc, char *argv[], cfg_t **mycfg, cfg_opt_t *myopts, char *myname, struct options_common **allopts)
 
{
 
  char *configfileprefix;
 
  char *configfile;
 

	
 
  size_t i;
 

	
 
  char *optstring = "hc:";
 
  char curopt;
 

	
 
  configfileprefix = NULL;
 
  while((curopt = getopt(argc, argv, optstring)) != -1)
 
  while((curopt = getopt(argc, argv, optstring)) != (char)-1)
 
    switch(curopt)
 
      {
 
      case 'h':
 
	fprintf(stderr, "libdistren common options\n\
 
\n\
 
\t-h\tShow this help.\n\
 
\t-c <path>\tBasename for configuration files. For instance, if distrencommon.conf is located at /etc/distren/distrencommon.conf, set this option /etc/distren/distren . Default value: %s\n\
 
\n", SYSCONFDIR "/distren");
 
	return 2;
 
	break;
 
      case 'c':
 
	configfileprefix = strdup(optarg);
0 comments (0 inline, 0 general)