[Box Backup-commit] COMMIT r1724 - box/chris/merge/lib/server

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Thu Jul 5 20:28:31 BST 2007


Author: chris
Date: 2007-07-05 20:28:31 +0100 (Thu, 05 Jul 2007)
New Revision: 1724

Modified:
   box/chris/merge/lib/server/Daemon.cpp
Log:
Use a signed int instead of char for getopt, thanks Martin. (refs #3)


Modified: box/chris/merge/lib/server/Daemon.cpp
===================================================================
--- box/chris/merge/lib/server/Daemon.cpp	2007-07-04 18:24:33 UTC (rev 1723)
+++ box/chris/merge/lib/server/Daemon.cpp	2007-07-05 19:28:31 UTC (rev 1724)
@@ -110,7 +110,7 @@
 	int masterLevel = Log::INFO; // need an int to do math with
 	#endif
 
-	signed char c;
+	signed int c;
 
 	// reset getopt, just in case anybody used it before.
 	// unfortunately glibc and BSD differ on this point!
@@ -122,16 +122,8 @@
 		optreset = 1;
 	#endif
 
-	BOX_TRACE("'?' == " << (int)'?');
-
 	while((c = getopt(argc, (char * const *)argv, "c:DFqvVt:Tk")) != -1)
 	{
-		BOX_TRACE("getopt: returned '" << c << "' (" << (int)c << ")");
-		BOX_TRACE("getopt: optind = " << optind);
-		BOX_TRACE("getopt: optopt = " << optopt);
-		BOX_TRACE("getopt: optarg = " << optarg);
-		BOX_TRACE("getopt: argv[optind] = " << argv[optind]);
-
 		switch(c)
 		{
 			case 'c':
@@ -220,8 +212,6 @@
 		}
 	}
 
-	BOX_TRACE("getopt: returned " << (int)c << ", finished.");
-
 	if (argc > optind && !haveConfigFile)
 	{
 		mConfigFileName = argv[optind]; optind++;




More information about the Boxbackup-commit mailing list