summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-16 17:50:15 -0400
committermidipix <writeonce@midipix.org>2016-04-16 17:50:15 -0400
commitdcb4535da0c4e22eafb51a20128c436e3337f8b7 (patch)
tree60a7ccd27459d96ea99b794686cd7f68bc6f0b2d /src
parent238670b963a2da48ed42a00548a829794baf175a (diff)
downloadslibtool-dcb4535da0c4e22eafb51a20128c436e3337f8b7.tar.bz2
slibtool-dcb4535da0c4e22eafb51a20128c436e3337f8b7.tar.xz
driver: fix version-related logic, always invoke slbt_init_version_info().
Diffstat (limited to 'src')
-rw-r--r--src/driver/slbt_driver_ctx.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 6c2990e..919e823 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -451,6 +451,9 @@ static int slbt_init_version_info(
int revision;
int age;
+ if (!verinfo->verinfo && !verinfo->vernumber)
+ return 0;
+
if (verinfo->vernumber) {
sscanf(verinfo->vernumber,"%d:%d:%d",
&verinfo->major,
@@ -810,11 +813,10 @@ int slbt_get_driver_ctx(
}
/* version info */
- if (ctx->cctx.verinfo.verinfo)
- if (slbt_init_version_info(ctx,&ctx->cctx.verinfo)) {
- slbt_free_driver_ctx(&ctx->ctx);
- return -1;
- }
+ if (slbt_init_version_info(ctx,&ctx->cctx.verinfo)) {
+ slbt_free_driver_ctx(&ctx->ctx);
+ return -1;
+ }
/* link params */
if (cctx.mode == SLBT_MODE_LINK)