getopt(3) returns an int, not a char, and -1 for failure...

This commit is contained in:
pvalchev 2002-02-20 21:24:46 +00:00
parent 653d63b9e7
commit c05ee76980
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-programs_bgpsim_bgpsim_c,v 1.1 2002/02/20 21:24:46 pvalchev Exp $
--- programs/bgpsim/bgpsim.c.orig Sun Nov 28 22:16:36 1999
+++ programs/bgpsim/bgpsim.c Wed Feb 20 14:16:26 2002
@@ -513,7 +513,8 @@ add_bgpsim_config (void) {
int
main (int argc, char *argv[])
{
- char c, *p, *name = argv[0];
+ char *p, *name = argv[0];
+ int c;
extern char *optarg; /* getopt stuff */
extern int optind; /* getopt stuff */
int errors = 0;

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-programs_sbgp_simple_bgp_c,v 1.1 2002/02/20 21:24:46 pvalchev Exp $
--- programs/sbgp/simple_bgp.c.orig Wed May 3 14:26:05 2000
+++ programs/sbgp/simple_bgp.c Wed Feb 20 14:16:53 2002
@@ -216,7 +216,7 @@ io_timer (void)
int
main (int argc, char *argv[])
{
- char c;
+ int c;
extern char *optarg; /* getopt stuff */
extern int optind; /* getopt stuff */
prefix_t *prefix;