From 5bf1b0e5f500b6b99a866da32dd9002219cac6d6 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Sat, 28 May 2016 22:28:26 -0700 Subject: 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. --- src/builtin.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/builtin.cpp') 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: { -- cgit v1.2.3