Soeren,
Sorry for the delay on this.
On 10/06/2014 09:29 PM, Soeren Apel wrote:
> +/**
> + * Queries a device instances' vendor.
> + *
> + * @param sdi Device instance to use. Must not be NULL.
> + *
> + * @return A copy of the vendor string or NULL. The caller is responsible for
> + * g_free()ing the string when it is no longer needed.
> + */
> +SR_API char *sr_dev_inst_vendor_get(struct sr_dev_inst *sdi)
> +{
> + if (!sdi)
> + return NULL;
> +
> + return g_strdup(sdi->vendor);
> +}
I don't see a need to always return a newly allocated string here. Better to
return the internal string as a const char *, and the caller can always
strdup() it if a permanent copy is needed.
Other than that the patch set looks fine, and is ready to go in.
--
Bert Vermeulen [email protected] email/xmpp
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel