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 8602 by michael, Tue Feb 20 19:30:13 2018 UTC vs.
Revision 8603 by michael, Sun Oct 28 19:43:30 2018 UTC

# Line 68 | Line 68 | parseargs(int *argc, char ***argv, struc
68      /* Search through our argument list, and see if it matches */
69      for (unsigned int i = 0; opts[i].opt; ++i)
70      {
71 <      if (!strcmp(opts[i].opt, opt))
71 >      if (strcmp(opts[i].opt, opt) == 0)
72        {
73          /* Found our argument */
74          found = 1;
# Line 117 | Line 117 | parseargs(int *argc, char ***argv, struc
117        }
118      }
119  
120 <    if (!found)
120 >    if (found == 0)
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)