Skip to content

Commit 4ab97f5

Browse files
fabiobaltierinashif
authored andcommitted
sys: getopt: drop the gcd definition
This is available in util.h since 646f255 and the existing one creates a collision and build breakage. Just drop it. Signed-off-by: Fabio Baltieri <[email protected]>
1 parent 8f0df40 commit 4ab97f5

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

lib/utils/getopt/getopt_long.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ static int getopt_internal(struct sys_getopt_state *state, int nargc, char *cons
8585
static int parse_long_options(struct sys_getopt_state *state, char *const *nargv,
8686
const char *options, const struct sys_getopt_option *long_options,
8787
int *idx, int short_too, int flags);
88-
static int gcd(int a, int b);
8988
static void permute_args(int panonopt_start, int panonopt_end, int opt_end, char *const *nargv);
9089

9190
/* Error messages */
@@ -106,23 +105,6 @@ static int dash_prefix = NO_PREFIX;
106105
#define ILLOPTSTRING "unknown option -- %s"
107106
#endif
108107

109-
/*
110-
* Compute the greatest common divisor of a and b.
111-
*/
112-
static int gcd(int a, int b)
113-
{
114-
int c;
115-
116-
c = a % b;
117-
while (c != 0) {
118-
a = b;
119-
b = c;
120-
c = a % b;
121-
}
122-
123-
return b;
124-
}
125-
126108
/*
127109
* Exchange the block from nonopt_start to nonopt_end with the block
128110
* from nonopt_end to opt_end (keeping the same order of arguments

0 commit comments

Comments
 (0)