Mercurial > vim
view src/which.sh @ 24422:41cf1155ab90 v8.2.2751
patch 8.2.2751: Coverity warns for using NULL pointer
Commit: https://github.com/vim/vim/commit/fed9e830fcffa90cf73dd125a27d27ed7eafbd68
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 10 21:38:38 2021 +0200
patch 8.2.2751: Coverity warns for using NULL pointer
Problem: Coverity warns for using NULL pointer.
Solution: Check for NULL in calling function.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 10 Apr 2021 21:45:03 +0200 |
parents | 3fc0f57ecb91 |
children |
line wrap: on
line source
#! /bin/sh # # which.sh -- find where an executable is located. It's here because the # "which" command is not supported everywhere. Used by Makefile. IFS=":" for ac_dir in $PATH; do if test -f "$ac_dir/$1"; then echo "$ac_dir/$1" break fi done