From: Ralph Corderoy Date: Sun, 23 Oct 2016 22:02:01 +0000 (+0100) Subject: Use HasPrefix() instead of strncmp(). X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/af86c4808e93e1f23416d93f1ccf9d68342637a4 Use HasPrefix() instead of strncmp(). --- diff --git a/sbr/utils.c b/sbr/utils.c index 06835d2b..2e61df89 100644 --- a/sbr/utils.c +++ b/sbr/utils.c @@ -502,7 +502,7 @@ nmh_version_changed (int older) { break for versions with multiple decimal points, etc. */ const float current_version = strtof (VERSION, NULL); const float old_version = - context_version && strncmp (context_version, "nmh-", 4) == 0 + context_version && HasPrefix(context_version, "nmh-") ? strtof (context_version + 4, NULL) : 99999999;