On Wed, Jun 28, 2017 at 07:05 -0500, Richard Allen wrote:
> 
> diff --git a/src/hardware/testo/protocol.c b/src/hardware/testo/protocol.c
> index 396612fd..dcea9573 100644
> --- a/src/hardware/testo/protocol.c
> +++ b/src/hardware/testo/protocol.c
> @@ -171,7 +171,7 @@ SR_PRIV int testo_request_packet(const struct sr_dev_inst 
> *sdi)
>  SR_PRIV gboolean testo_check_packet_prefix(unsigned char *buf, int len)
>  {
>       int i;
> -     unsigned char check[] = { 0x21, 0, 0, 0, 1 };
> +     static const unsigned char check[] = { 0x21, 0, 0, 0, 1 };
>  
>       if (len < 5)
>               return FALSE;
> diff --git a/src/hardware/victor-dmm/protocol.c 
> b/src/hardware/victor-dmm/protocol.c
> index 13a9befa..afcaabca 100644
> --- a/src/hardware/victor-dmm/protocol.c
> +++ b/src/hardware/victor-dmm/protocol.c
> @@ -272,8 +272,8 @@ SR_PRIV int victor_dmm_receive_data(struct sr_dev_inst 
> *sdi, unsigned char *buf)
>       GString *dbg;
>       int i;
>       unsigned char data[DMM_DATA_SIZE];
> -     unsigned char obfuscation[DMM_DATA_SIZE] = "jodenxunickxia";
> -     unsigned char shuffle[DMM_DATA_SIZE] = {
> +     static const unsigned char obfuscation[DMM_DATA_SIZE] = 
> "jodenxunickxia";
> +     static const unsigned char shuffle[DMM_DATA_SIZE] = {
>               6, 13, 5, 11, 2, 7, 9, 8, 3, 10, 12, 0, 4, 1
>       };
>  

This might be rather picky, but some projects mandate that static
vars be declared before non-static vars, and separated from the
latter.  Can't tell whether sigrok is similarly strict.  Just
saying ...


virtually yours
Gerhard Sittig
-- 
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to