diff options
author | dundargoc <gocdundar@gmail.com> | 2023-09-29 14:58:48 +0200 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-05 20:19:06 +0100 |
commit | acc646ad8fc3ef11fcc63b69f3d8484e4a91accd (patch) | |
tree | 613753f19fe6f6fa45884750eb176c1517269ec2 /src/nvim/os/shell.c | |
parent | c513cbf361000e6f09cd5b71b718e9de3f88904d (diff) | |
download | rneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.tar.gz rneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.tar.bz2 rneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.zip |
refactor: the long goodbye
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
Diffstat (limited to 'src/nvim/os/shell.c')
-rw-r--r-- | src/nvim/os/shell.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c index a206eefd53..2f52895357 100644 --- a/src/nvim/os/shell.c +++ b/src/nvim/os/shell.c @@ -366,7 +366,7 @@ int os_expand_wildcards(int num_pat, char **pat, int *num_file, char ***file, in // When running in the background, give it some time to create the temp // file, but don't wait for it to finish. if (ampersand) { - os_delay(10L, true); + os_delay(10, true); } xfree(command); @@ -401,7 +401,7 @@ int os_expand_wildcards(int num_pat, char **pat, int *num_file, char ***file, in xfree(tempname); goto notfound; } - int fseek_res = fseek(fd, 0L, SEEK_END); + int fseek_res = fseek(fd, 0, SEEK_END); if (fseek_res < 0) { xfree(tempname); fclose(fd); @@ -417,7 +417,7 @@ int os_expand_wildcards(int num_pat, char **pat, int *num_file, char ***file, in assert(templen <= SIZE_MAX); // NOLINT(runtime/int) #endif len = (size_t)templen; - fseek(fd, 0L, SEEK_SET); + fseek(fd, 0, SEEK_SET); buffer = xmalloc(len + 1); // fread() doesn't terminate buffer with NUL; // appropriate termination (not always NUL) is done below. @@ -802,9 +802,9 @@ char *get_cmd_output(char *cmd, char *infile, ShellOpts flags, size_t *ret_len) goto done; } - fseek(fd, 0L, SEEK_END); + fseek(fd, 0, SEEK_END); size_t len = (size_t)ftell(fd); // get size of temp file - fseek(fd, 0L, SEEK_SET); + fseek(fd, 0, SEEK_SET); buffer = xmalloc(len + 1); size_t i = fread(buffer, 1, len, fd); |