Skip to content
Snippets Groups Projects
Commit 1f786424 authored by Simon Rose's avatar Simon Rose
Browse files

Remove unneeded comparison results EXACT and TESTVERS

parent bcf4faa5
No related branches found
No related tags found
1 merge request!115E3-1058: Add revision number parsing to test versions
......@@ -594,9 +594,7 @@ int libversionShow(const char *outfile) {
}
#define MISMATCH -1
#define EXACT 0
#define MATCH 1
#define TESTVERS 2
#define HIGHER 3
#define debug(...) \
......@@ -958,13 +956,6 @@ static int require_priv(
if (loaded) {
/* Library already loaded. Check Version. */
switch (compareVersions(loaded, version, FALSE)) {
case TESTVERS:
if (version)
printf(
"Warning: Module %s test version %s already loaded where %s was "
"requested\n",
module, loaded, version);
case EXACT:
case MATCH:
printf("Module %s version %s already loaded\n", module, loaded);
break;
......@@ -1030,9 +1021,7 @@ static int require_priv(
currentFilename, version);
switch ((status = compareVersions(currentFilename, version, FALSE))) {
case TESTVERS: /* test version found */
case EXACT: /* exact match found */
case MATCH: /* all given numbers match. */
case MATCH: /* all given numbers match. */
{
someArchFound = 1;
......@@ -1059,15 +1048,6 @@ static int require_priv(
continue;
}
if (status == EXACT) {
if (requireDebug)
printf("require: %s %s matches %s exactly\n", module,
currentFilename, version);
/* We are done. */
end = NULL;
break;
}
/* Is it higher than the one we found before? */
if (found && requireDebug)
printf(
......@@ -1093,7 +1073,7 @@ static int require_priv(
continue;
}
}
/* we have found something (EXACT or MATCH) */
/* we have found something */
free(founddir);
/* filename = "<dirname>/[dirlen]<module>/[modulediroffs]..." */
if (asprintf(&founddir, "%.*s%s", modulediroffs, filename,
......@@ -1101,7 +1081,6 @@ static int require_priv(
return errno;
/* founddir = "<dirname>/[dirlen]<module>/[modulediroffs]<version>" */
found = founddir + modulediroffs; /* version part in the path */
if (status == EXACT) break;
}
END_DIR_LOOP
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment