]> sigrok.org Git - libsigrok.git/commitdiff
Consistently use __func__ instead of __FUNCTION__.
authorUwe Hermann <redacted>
Thu, 17 Nov 2011 22:00:33 +0000 (23:00 +0100)
committerUwe Hermann <redacted>
Thu, 17 Nov 2011 22:47:45 +0000 (23:47 +0100)
The __func__ form is standardized and more portable.

hardware/zeroplus-logic-cube/gl_usb.c
hardware/zeroplus-logic-cube/zeroplus.c

index c84e61c4c980d911223ce43e9b0632cd7c568b3e..58d50bad68e1cf15b61eda077dfa431803f534a8 100644 (file)
@@ -66,7 +66,7 @@ int gl_write_address(libusb_device_handle *devh, unsigned int address)
                                         0, packet, 1, TIMEOUT);
        if (ret != 1)
                sr_err("%s: libusb_control_transfer returned %d\n",
-                      __FUNCTION__, ret);
+                      __func__, ret);
        return ret;
 }
 
@@ -79,7 +79,7 @@ int gl_write_data(libusb_device_handle *devh, unsigned int val)
                                      0, packet, 1, TIMEOUT);
        if (ret != 1)
                sr_err("%s: libusb_control_transfer returned %d\n",
-                      __FUNCTION__, ret);
+                      __func__, ret);
        return ret;
 }
 
@@ -92,7 +92,7 @@ int gl_read_data(libusb_device_handle *devh)
                                      0, packet, 1, TIMEOUT);
        if (ret != 1)
                sr_err("%s: libusb_control_transfer returned %d, val=%hhx\n",
-                      __FUNCTION__, ret, packet[0]);
+                      __func__, ret, packet[0]);
        return (ret == 1) ? packet[0] : ret;
 }
 
@@ -107,7 +107,7 @@ int gl_read_bulk(libusb_device_handle *devh, void *buffer, unsigned int size)
                                      0, packet, 8, TIMEOUT);
        if (ret != 8)
                sr_err("%s: libusb_control_transfer returned %d\n",
-                      __FUNCTION__, ret);
+                      __func__, ret);
 
        ret = libusb_bulk_transfer(devh, ENDPOINT_BULK_IN, buffer, size,
                                   &transferred, TIMEOUT);
index b25ce3640c1b271f2a9c49416df7a535e6fcf57f..e48bf5e699714bd61739104b343e18a5a34771ec 100644 (file)
@@ -453,7 +453,7 @@ static int *hw_get_capabilities(void)
 /* TODO: This will set the same samplerate for all devices. */
 static int set_configuration_samplerate(uint64_t samplerate)
 {
-       sr_info("%s(%" PRIu64 ")", __FUNCTION__, samplerate);
+       sr_info("%s(%" PRIu64 ")", __func__, samplerate);
        if (samplerate > SR_MHZ(1))
                analyzer_set_freq(samplerate / SR_MHZ(1), FREQ_SCALE_MHZ);
        else if (samplerate > SR_KHZ(1))