From: Uwe Hermann Date: Sun, 19 Apr 2015 16:28:10 +0000 (+0200) Subject: Constify the sp_get_port_transport() parameter. X-Git-Tag: libserialport-0.1.1~50 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ad036cc8efcdcae5d2b8727996108c38c4915d2b;p=libserialport.git Constify the sp_get_port_transport() parameter. --- diff --git a/libserialport.h.in b/libserialport.h.in index 49697a9..1dd4715 100644 --- a/libserialport.h.in +++ b/libserialport.h.in @@ -426,7 +426,7 @@ char *sp_get_port_description(struct sp_port *port); * * @since 0.1.1 */ -enum sp_transport sp_get_port_transport(struct sp_port *port); +enum sp_transport sp_get_port_transport(const struct sp_port *port); /** * Get the USB bus number and address on bus of a USB serial adapter port. diff --git a/serialport.c b/serialport.c index 9826df4..272bdf6 100644 --- a/serialport.c +++ b/serialport.c @@ -136,7 +136,7 @@ SP_API char *sp_get_port_description(struct sp_port *port) RETURN_STRING(port->description); } -SP_API enum sp_transport sp_get_port_transport(struct sp_port *port) +SP_API enum sp_transport sp_get_port_transport(const struct sp_port *port) { TRACE("%p", port);