Mercurial > vim
comparison src/findfile.c @ 20830:9064044fd4f6 v8.2.0967
patch 8.2.0967: unnecessary type casts for vim_strnsave()
Commit: https://github.com/vim/vim/commit/71ccd03ee8a43b20000214a9c99dcc90f039edca
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jun 12 22:59:11 2020 +0200
patch 8.2.0967: unnecessary type casts for vim_strnsave()
Problem: Unnecessary type casts for vim_strnsave().
Solution: Remove the type casts.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 12 Jun 2020 23:00:04 +0200 |
parents | aadd1cae2ff5 |
children | 9c24319b4cb2 |
comparison
equal
deleted
inserted
replaced
20829:3d0d6410aecd | 20830:9064044fd4f6 |
---|---|
449 break; | 449 break; |
450 walker = vim_strchr(walker, ';'); | 450 walker = vim_strchr(walker, ';'); |
451 if (walker) | 451 if (walker) |
452 { | 452 { |
453 search_ctx->ffsc_stopdirs_v[dircount-1] = | 453 search_ctx->ffsc_stopdirs_v[dircount-1] = |
454 vim_strnsave(helper, (int)(walker - helper)); | 454 vim_strnsave(helper, walker - helper); |
455 walker++; | 455 walker++; |
456 } | 456 } |
457 else | 457 else |
458 // this might be "", which means ascent till top | 458 // this might be "", which means ascent till top |
459 // of directory tree. | 459 // of directory tree. |
482 int llevel; | 482 int llevel; |
483 int len; | 483 int len; |
484 char *errpt; | 484 char *errpt; |
485 | 485 |
486 // save the fix part of the path | 486 // save the fix part of the path |
487 search_ctx->ffsc_fix_path = vim_strnsave(path, (int)(wc_part - path)); | 487 search_ctx->ffsc_fix_path = vim_strnsave(path, wc_part - path); |
488 | 488 |
489 /* | 489 /* |
490 * copy wc_path and add restricts to the '**' wildcard. | 490 * copy wc_path and add restricts to the '**' wildcard. |
491 * The octet after a '**' is used as a (binary) counter. | 491 * The octet after a '**' is used as a (binary) counter. |
492 * So '**3' is transposed to '**^C' ('^C' is ASCII value 3) | 492 * So '**3' is transposed to '**^C' ('^C' is ASCII value 3) |