ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/getopt.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/getopt.c (file contents):
Revision 8655 by michael, Sun Oct 28 19:43:30 2018 UTC vs.
Revision 8656 by michael, Sun Nov 11 20:19:17 2018 UTC

# Line 54 | Line 54 | parseargs(int *argc, char ***argv, struc
54    /* Loop through each argument */
55    while (1)
56    {
57 <    int found = 0;
57 >    bool found = false;
58      const char *opt = NULL;
59  
60      (*argc)--;
# Line 71 | Line 71 | parseargs(int *argc, char ***argv, struc
71        if (strcmp(opts[i].opt, opt) == 0)
72        {
73          /* Found our argument */
74 <        found = 1;
74 >        found = true;
75  
76          switch (opts[i].argtype)
77          {
# Line 117 | Line 117 | parseargs(int *argc, char ***argv, struc
117        }
118      }
119  
120 <    if (found == 0)
120 >    if (found == false)
121      {
122        fprintf(stderr, "Error: unknown argument '%c%s'\n",
123                OPTCHAR, opt);

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)