summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2014-02-27 18:21:33 +0100
committerKrzysztof Opasiak <k.opasiak@samsung.com>2014-03-11 09:25:12 +0100
commit427d5ab2a777937ab4775eed525ed273f185c2ad (patch)
treeee9eb1b272699f412f2f04d0af31f444ece4391c /examples
parent06424b374571adaa57b4b660fe25ce1d62a1a067 (diff)
downloadlibusbg-427d5ab2a777937ab4775eed525ed273f185c2ad.tar.gz
libusbg-427d5ab2a777937ab4775eed525ed273f185c2ad.tar.bz2
libusbg-427d5ab2a777937ab4775eed525ed273f185c2ad.zip
libusbg: Add return value to gadget creation functions.
Functions related to gadget creation should return error codes instead of pointer. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/gadget-acm-ecm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/gadget-acm-ecm.c b/examples/gadget-acm-ecm.c
index 5ab42cf..b1131b4 100644
--- a/examples/gadget-acm-ecm.c
+++ b/examples/gadget-acm-ecm.c
@@ -63,8 +63,8 @@ int main(void)
goto out1;
}
- g = usbg_create_gadget(s, "g1", &g_attrs, &g_strs);
- if (!g) {
+ usbg_ret = usbg_create_gadget(s, "g1", &g_attrs, &g_strs, &g);
+ if (usbg_ret != USBG_SUCCESS) {
fprintf(stderr, "Error on create gadget\n");
goto out2;
}