X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FSpookyHashV1.cpp;h=cdd09193a603853daf293b99dc06eca3ca22fbdf;hb=bfdfe5e42dcc01a346ce157530101df6d50df234;hp=d8635940fa6d47e69475b17678b13c5dac1fbb8e;hpb=148cba11ab1b0d20f17485bd80fcc7e7214f5cca;p=folly.git diff --git a/folly/SpookyHashV1.cpp b/folly/SpookyHashV1.cpp index d8635940..cdd09193 100644 --- a/folly/SpookyHashV1.cpp +++ b/folly/SpookyHashV1.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2012 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ // July 12 2012: was passing out variables in final to in/out in short // July 30 2012: I reintroduced the buffer overflow -#include "folly/SpookyHashV1.h" +#include #include @@ -196,7 +196,7 @@ void SpookyHashV1::Hash128( remainder = (length - ((const uint8_t *)end-(const uint8_t *)message)); memcpy(buf, end, remainder); memset(((uint8_t *)buf)+remainder, 0, sc_blockSize-remainder); - ((uint8_t *)buf)[sc_blockSize-1] = remainder; + ((uint8_t*)buf)[sc_blockSize - 1] = uint8_t(remainder); Mix(buf, h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11); // do some final mixing