]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
seq: user_client: use constant qualifier for read-only parameter
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 11 May 2020 09:03:33 +0000 (18:03 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Mon, 11 May 2020 09:40:48 +0000 (18:40 +0900)
The 'port_id' parameters of 'alsaseq_user_client_create_port()' is
a pointer to storage of unsigned char type, due to optional parameter
in g-i interface. It's read-only if having value and it's better to
have const qualifier.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
src/seq/user-client.c
src/seq/user-client.h

index c91d2d4357db258b30045c643aa0fac1969dd8f3..058613b09930d81ab2a134505f6bad99b98e3657 100644 (file)
@@ -218,7 +218,7 @@ void alsaseq_user_client_get_info(ALSASeqUserClient *self,
  */
 void alsaseq_user_client_create_port(ALSASeqUserClient *self,
                                      ALSASeqPortInfo *port_info,
-                                     guint8 *port_id, GError **error)
+                                     const guint8 *port_id, GError **error)
 {
     ALSASeqUserClientPrivate *priv;
     struct snd_seq_port_info *info;
index d6ed1369841fee1471cffc3465fc28d683876769..74ff0a4906b5db6e682c36a019130224e037c4ff 100644 (file)
@@ -81,7 +81,7 @@ void alsaseq_user_client_get_info(ALSASeqUserClient *self,
 
 void alsaseq_user_client_create_port(ALSASeqUserClient *self,
                                      ALSASeqPortInfo *port_info,
-                                     guint8 *port_id, GError **error);
+                                     const guint8 *port_id, GError **error);
 
 void alsaseq_user_client_update_port(ALSASeqUserClient *self,
                                      ALSASeqPortInfo *port_info,