From: Michael Gernoth Date: Sun, 30 May 2010 20:50:22 +0000 (+0200) Subject: get rid of unneeded global variable X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/rigol/commitdiff_plain/a626d42748fba1f8d5b33a497eb8e2fbaf85f966 get rid of unneeded global variable --- diff --git a/rigol.c b/rigol.c index 7c42892..23a4b7a 100644 --- a/rigol.c +++ b/rigol.c @@ -20,8 +20,6 @@ rmmod uhci_hcd; modprobe uhci_hcd #include -unsigned char seq=0; - //This routine locates a scope by VID/PID and returns an opened handle to it. usb_dev_handle *find_scope() { struct usb_bus *bus; @@ -96,6 +94,8 @@ int sendscpi(usb_dev_handle *dev, char* cmd, unsigned char *buff; int len,r,i; int cmdlen = strlen(cmd); + static unsigned char seq=0; + buff=malloc(0x40); seq++;