aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-07-16 20:10:08 +0200
committerGitHub <noreply@github.com>2019-07-16 20:10:08 +0200
commitbab24a88ab48e18506bb00c6418a76ef77f77f49 (patch)
tree6b6bfb37614e5ba27ca93c0773f18d4521b1a5e6 /src/nvim/eval.c
parentf31f2d0b225c5795eff29d4380dd66936fb6d96d (diff)
downloadrneovim-bab24a88ab48e18506bb00c6418a76ef77f77f49.tar.gz
rneovim-bab24a88ab48e18506bb00c6418a76ef77f77f49.tar.bz2
rneovim-bab24a88ab48e18506bb00c6418a76ef77f77f49.zip
viml/profile: revert proftime_T to unsigned type #10521
- reltimestr(): Produce negative value by comparing the unsigned proftime_T value to INT64_MAX. https://github.com/neovim/neovim/issues/10452#issuecomment-511155132 1. The interfaces of nearly all platforms return uint64_t. INT64_MAX is only half of that. 2. Low-level interfaces like this typically define that there is no fixed starting point. The only guarantees are that it's (a) monotonically increasing at a rate that (b) matches real time. ref 06af88cd72ea fix #10452
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 67aaf3c25c..1a690fdf8f 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -13840,7 +13840,7 @@ static void f_reltimestr(typval_T *argvars, typval_T *rettv, FunPtr fptr)
rettv->v_type = VAR_STRING;
rettv->vval.v_string = NULL;
if (list2proftime(&argvars[0], &tm) == OK) {
- rettv->vval.v_string = (char_u *) xstrdup(profile_msg(tm));
+ rettv->vval.v_string = (char_u *)xstrdup(profile_msg(tm));
}
}