File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 1
- if (BUILD_SHARED_LIBS AND NOT MSVC )
2
- find_library (M_LIB m)
3
- endif ()
4
1
if (BUILD_SHARED_LIBS )
5
2
find_library (PBC_LIB protobuf-c)
6
3
endif ()
@@ -65,9 +62,6 @@ add_library(omemo-c
65
62
)
66
63
67
64
if (BUILD_SHARED_LIBS )
68
- if (NOT MSVC )
69
- target_link_libraries (omemo-c ${M_LIB} )
70
- endif ()
71
65
target_link_libraries (omemo-c ${PBC_LIB} )
72
66
set_target_properties (omemo-c PROPERTIES
73
67
VERSION ${OMEMO_C_VERSION}
Original file line number Diff line number Diff line change 3
3
#include <stdio.h>
4
4
#include <stdlib.h>
5
5
#include <string.h>
6
- #include <math.h>
7
6
#include <assert.h>
8
7
9
8
#include "signal_protocol_internal.h"
@@ -106,7 +105,8 @@ ssize_t hkdf_expand(hkdf_context *context,
106
105
const uint8_t * info , size_t info_len ,
107
106
size_t output_len )
108
107
{
109
- int iterations = (int )ceil ((double )output_len / (double )HASH_OUTPUT_SIZE );
108
+ int iterations = (int )output_len / HASH_OUTPUT_SIZE ;
109
+ if (output_len % HASH_OUTPUT_SIZE > 0 ) iterations ++ ;
110
110
size_t remaining_len = output_len ;
111
111
signal_buffer * step_buffer = 0 ;
112
112
size_t step_size = 0 ;
You can’t perform that action at this time.
0 commit comments