diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-03-23 09:20:29 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-23 09:20:29 -0700 |
| commit | 651847f5bcf468e06f4153a438892e517e005dde (patch) | |
| tree | 6f9545b1149c1ec895ea906b733e381bf948c6dd /dir.c | |
| parent | 6e8d538aab8fe4dd07ba9fb87b5c7edcfa5706ad (diff) | |
| parent | 02cbae61df7b3493e7f76f8385fc9257de60755f (diff) | |
| download | git-651847f5bcf468e06f4153a438892e517e005dde.tar.xz | |
Merge branch 'cf/constness-fixes'
Small code clean-up around the constness area.
* cf/constness-fixes:
dir: avoid -Wdiscarded-qualifiers in remove_path()
bloom: remove a misleading const qualifier
Diffstat (limited to 'dir.c')
| -rw-r--r-- | dir.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -3518,15 +3518,15 @@ int get_sparse_checkout_patterns(struct pattern_list *pl) int remove_path(const char *name) { - char *slash; + const char *last; if (unlink(name) && !is_missing_file_error(errno)) return -1; - slash = strrchr(name, '/'); - if (slash) { + last = strrchr(name, '/'); + if (last) { char *dirs = xstrdup(name); - slash = dirs + (slash - name); + char *slash = dirs + (last - name); do { *slash = '\0'; if (startup_info->original_cwd && |
