include stdint.h
[rigol] / scope.c
diff --git a/scope.c b/scope.c
index 3152243733ee7f1869ff4f35ebdf388a11c5aa00..862f32b396e1d93007ec084b6718d445dd03ad4a 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -2,6 +2,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <stdint.h>
 
 #include "usbtmc.h"
 #include "scope.h"
@@ -36,8 +37,10 @@ struct scope* initscope(void)
 
        usbdev = usbtmc_initscope();
 
-       if (!usbdev)
-               return NULL;
+       if (!usbdev) {
+               printf("No scope found.\n");
+               exit(EXIT_FAILURE);
+       }
 
        sc = calloc(1, sizeof(struct scope));
        if (sc == NULL) {
Impressum, Datenschutz