OSDN Git Service

Change the parameter type of smp_debug_print_nbyte_little_endian
authorJack He <siyuanh@google.com>
Thu, 15 Dec 2016 18:56:55 +0000 (10:56 -0800)
committerJack He <siyuanh@google.com>
Thu, 15 Dec 2016 19:02:53 +0000 (11:02 -0800)
commit648d513fd66d28a10dab4def62ca2d27187ccc34
treec4c59208535ffddf42575e1095f9d15fc1e74bac
parenta57ce82732e87129387743014e69769e52cd4417
Change the parameter type of smp_debug_print_nbyte_little_endian

* This function used to take (const uint8_t*) as the second parameter
  and it causes all its calls to cast a (const char*) to this type
* This patch changes it to (const char*) so no cast needed

Coccinelle-assisted:

@ rule1 @
type T;
expression A, B, C;
@@

smp_debug_print_nbyte_little_endian(A,
- (T)
B, C);

and

for file in $(find . -name "*.cc"); do
  spatch --sp-file refactor_smp_print_func.cocci --in-place $file
done

Bug: 33663033
Test: code compilation, no user visible effect
Change-Id: Ibeed0b414514acc4a8e94e47e99117bdb3e454ff
stack/smp/smp_act.cc
stack/smp/smp_int.h
stack/smp/smp_keys.cc