diff options
author | midipix <writeonce@midipix.org> | 2016-04-16 17:50:15 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-04-16 17:50:15 -0400 |
commit | dcb4535da0c4e22eafb51a20128c436e3337f8b7 (patch) | |
tree | 60a7ccd27459d96ea99b794686cd7f68bc6f0b2d /src/driver/slbt_driver_ctx.c | |
parent | 238670b963a2da48ed42a00548a829794baf175a (diff) | |
download | slibtool-dcb4535da0c4e22eafb51a20128c436e3337f8b7.tar.bz2 slibtool-dcb4535da0c4e22eafb51a20128c436e3337f8b7.tar.xz |
driver: fix version-related logic, always invoke slbt_init_version_info().
Diffstat (limited to 'src/driver/slbt_driver_ctx.c')
-rw-r--r-- | src/driver/slbt_driver_ctx.c | 12 |
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) |