svn commit: r316627 - head/usr.sbin/acpi/acpiconf

Alexander Kabaev kan at FreeBSD.org
Fri Apr 7 22:58:33 UTC 2017


Author: kan
Date: Fri Apr  7 22:58:31 2017
New Revision: 316627
URL: https://svnweb.freebsd.org/changeset/base/316627

Log:
  Use int to receive the return value of getopt function.
  
  getopt returns int and not char, so assigning the value to
  char is not ideal, especially on platforms with unsigned
  chars.

Modified:
  head/usr.sbin/acpi/acpiconf/acpiconf.c

Modified: head/usr.sbin/acpi/acpiconf/acpiconf.c
==============================================================================
--- head/usr.sbin/acpi/acpiconf/acpiconf.c	Fri Apr  7 22:58:28 2017	(r316626)
+++ head/usr.sbin/acpi/acpiconf/acpiconf.c	Fri Apr  7 22:58:31 2017	(r316627)
@@ -203,8 +203,8 @@ usage(const char* prog)
 int
 main(int argc, char *argv[])
 {
-	char	c, *prog;
-	int	sleep_type;
+	char	*prog;
+	int	c, sleep_type;
 
 	prog = argv[0];
 	if (argc < 2)


More information about the svn-src-head mailing list