summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2018-03-06 14:32:16 +1030
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-03-07 16:24:31 +1100
commita5f80e0a9a40732b9d7606ad369b288ce04cec29 (patch)
tree19bbf1b82f163e053b4cb40f52677a81d54a283c /ui
parent526d4b3d959d3d108f38f35dae0855a29692a069 (diff)
downloadtalos-petitboot-a5f80e0a9a40732b9d7606ad369b288ce04cec29.tar.gz
talos-petitboot-a5f80e0a9a40732b9d7606ad369b288ce04cec29.zip
discover: Fix bad check of version string
Clang says this: discover/device-handler.c:1564:27: warning: size argument in 'strncmp' call is a comparison [-Wmemsize-comparison] strlen(opt->version) == 0)) { ~~~~~~~~~~~~~~~~~~~~~^~~~ discover/device-handler.c:1563:5: note: did you mean to compare the result of 'strncmp' instead? strncmp(opt->version, tmp->version, ^ It looks like it's correct. However, we can go one better and drop the pointless strncmp(foo, bar, strlen(bar)), as this is equivalent to strcmp(foo, bar). Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'ui')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud