]> sigrok.org Git - libsigrok.git/commit
Use g_malloc0() consistently, simplify error handling.
authorUwe Hermann <redacted>
Fri, 21 Nov 2014 18:02:10 +0000 (19:02 +0100)
committerUwe Hermann <redacted>
Sat, 22 Nov 2014 16:02:57 +0000 (17:02 +0100)
commit91219afc75c9aa1d0c5e2da5c03343c1e43eb6df
tree82f700419bc69f26cca3fad57e730e601d42d207
parentc368e6f3d248a73d69cd0c2c4a7c88a92def55e3
Use g_malloc0() consistently, simplify error handling.

Use g_malloc0() for small allocations and assume they always
succeed. Simplify error handling in a few places accordingly.

Don't always sanity-check parameters for non-public (SR_PRIV)
functions, we require the developers to invoke them correctly.
This allows further error handling simplifications.
31 files changed:
src/backend.c
src/device.c
src/hardware/agilent-dmm/api.c
src/hardware/appa-55ii/api.c
src/hardware/atten-pps3xxx/api.c
src/hardware/brymen-dmm/api.c
src/hardware/cem-dt-885x/api.c
src/hardware/center-3xx/api.c
src/hardware/colead-slm/api.c
src/hardware/conrad-digi-35-cpu/api.c
src/hardware/fluke-dmm/api.c
src/hardware/gmc-mh-1x-2x/api.c
src/hardware/link-mso19/api.c
src/hardware/manson-hcs-3xxx/api.c
src/hardware/mic-985xx/api.c
src/hardware/motech-lps-30x/api.c
src/hardware/norma-dmm/api.c
src/hardware/openbench-logic-sniffer/api.c
src/hardware/serial-dmm/api.c
src/hardware/teleinfo/api.c
src/hardware/tondaj-sl-814/api.c
src/hardware/victor-dmm/api.c
src/hwdriver.c
src/lcr/es51919.c
src/output/analog.c
src/output/ols.c
src/scpi/scpi.c
src/scpi/scpi_serial.c
src/session.c
src/std.c
src/strutil.c