diff options
author | Kurtis Rader <krader@skepticism.us> | 2016-05-28 22:28:26 -0700 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-05-29 22:24:29 -0700 |
commit | 5bf1b0e5f500b6b99a866da32dd9002219cac6d6 (patch) | |
tree | 4622863e7f28ad7f840d6a7096057286aee4e750 /src/builtin.cpp | |
parent | 3d19b549c8d9fc77597d0de95260e90f5dda2dae (diff) |
fix random lint issues
This only eliminates errors reported by `make lint`. It shouldn't cause any
functional changes.
This change does remove several functions that are unused. It also removes the
`desc_arr` variable which is both unused and out of date with reality.
Diffstat (limited to 'src/builtin.cpp')
-rw-r--r-- | src/builtin.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/builtin.cpp b/src/builtin.cpp index 336f09eb..b445cdf0 100644 --- a/src/builtin.cpp +++ b/src/builtin.cpp @@ -81,7 +81,7 @@ // The send stuff to foreground message. #define FG_MSG _(L"Send job %d, '%ls' to foreground\n") -/// Datastructure to describe a builtin. +/// Data structure to describe a builtin. struct builtin_data_t { // Name of the builtin. const wchar_t *name; @@ -1807,9 +1807,7 @@ static int builtin_random(parser_t &parser, io_streams_t &streams, wchar_t **arg srand48_r(time(0), &seed_buffer); } lrand48_r(&seed_buffer, &res); - // The labs() shouldn't be necessary since lrand48 is supposed to - // return only positive integers but we're going to play it safe. - streams.out.append_format(L"%ld\n", labs(res % 32768)); + streams.out.append_format(L"%ld\n", res % 32768); break; } case 1: { |