iio: Simplify signchar parsing

This commit is contained in:
Bastien Nocera
2019-05-10 14:25:18 +02:00
committed by hadess
parent f90db92ca1
commit 746271f238

View File

@@ -176,10 +176,7 @@ iioutils_get_type (unsigned *is_signed,
*mask = ~0; *mask = ~0;
else else
*mask = (1 << *bits_used) - 1; *mask = (1 << *bits_used) - 1;
if (signchar == 's') *is_signed = (signchar == 's');
*is_signed = 1;
else
*is_signed = 0;
g_debug ("Got type for %s: is signed: %d, bytes: %d, bits_used: %d, shift: %d, mask: 0x%" G_GUINT64_FORMAT ", be: %d", g_debug ("Got type for %s: is signed: %d, bytes: %d, bits_used: %d, shift: %d, mask: 0x%" G_GUINT64_FORMAT ", be: %d",
name, *is_signed, *bytes, *bits_used, *shift, *mask, *be); name, *is_signed, *bytes, *bits_used, *shift, *mask, *be);