Changeset 131 in libcf
- Timestamp:
- 06/26/13 15:17:04 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cf_bitwise.c
r129 r131 13 13 #include <stdlib.h> 14 14 15 #define ASSERT_ARGS(x) \ 16 if ((x)) \ 17 return CF_ERROR_BITWISE_INVALID_ARGS 15 18 /** 16 19 * 비트열을 왼쪽으로 시프트 … … 39 42 cf_byte buf = 0; 40 43 41 if (!in || !out) 42 return CF_ERROR_BITWISE_INVALID_ARGS; 44 ASSERT_ARGS (!in || !out); 43 45 44 46 for (iter = 0 ; iter < remain ; iter++) … … 84 86 cf_byte buf = 0; 85 87 86 if (!in || !out) 87 return CF_ERROR_BITWISE_INVALID_ARGS; 88 ASSERT_ARGS (!in || !out); 88 89 89 90 for (iter = 0 ; iter < remain ; iter++) … … 123 124 cf_byte * buf2 = NULL; 124 125 125 if (!in || !out) 126 return CF_ERROR_BITWISE_INVALID_ARGS; 126 ASSERT_ARGS (!in || !out); 127 127 128 128 buf1 = (cf_byte *) calloc (size, 1); … … 165 165 cf_byte * buf2 = NULL; 166 166 167 if (!in || !out) 168 return CF_ERROR_BITWISE_INVALID_ARGS; 167 ASSERT_ARGS (!in || !out); 169 168 170 169 buf1 = (cf_byte *) calloc (size, 1); … … 206 205 size_t quota = size / 8; 207 206 208 if (!in1 || !in2) 209 return CF_ERROR_BITWISE_INVALID_ARGS; 207 ASSERT_ARGS (!in1 || !in2 || !out); 210 208 211 209 for (iter = 0 ; iter < quota ; iter++) … … 234 232 size_t quota = size / 8; 235 233 236 if (!in1 || !in2) 237 return CF_ERROR_BITWISE_INVALID_ARGS; 234 ASSERT_ARGS (!in1 || !in2 || !out); 238 235 239 236 for (iter = 0 ; iter < quota ; iter++) … … 262 259 size_t quota = size / 8; 263 260 264 if (!in1 || !in2) 265 return CF_ERROR_BITWISE_INVALID_ARGS; 261 ASSERT_ARGS (!in1 || !in2 || !out); 266 262 267 263 for (iter = 0 ; iter < quota ; iter++)
Note:
See TracChangeset
for help on using the changeset viewer.