get rid of unneeded global variable
authorMichael Gernoth <michael@gernoth.net>
Sun, 30 May 2010 20:50:22 +0000 (22:50 +0200)
committerMichael Gernoth <michael@gernoth.net>
Sun, 30 May 2010 20:50:22 +0000 (22:50 +0200)
rigol.c

diff --git a/rigol.c b/rigol.c
index 7c42892c5c727c834280ae6ddf874598c9466b26..23a4b7a3f53a825b6c22611b7f4bd2eba8345f94 100644 (file)
--- a/rigol.c
+++ b/rigol.c
@@ -20,8 +20,6 @@ rmmod uhci_hcd; modprobe uhci_hcd
 #include <readline/history.h>
 
 
-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++;
Impressum, Datenschutz