Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Apr 2017 22:58:31 +0000 (UTC)
From:      Alexander Kabaev <kan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r316627 - head/usr.sbin/acpi/acpiconf
Message-ID:  <201704072258.v37MwVnP005021@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704072258.v37MwVnP005021>