]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - vss.c
audio_format_name(): Add an assert().
[paraslash.git] / vss.c
diff --git a/vss.c b/vss.c
index 2de7a30c7bdc328cc82041135918a70da02c9578..98ad11f610087ffd5319adbbb8ecf503ccdb3b88 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -144,16 +144,17 @@ unsigned int vss_paused(void)
 }
 
 /**
- * get the name of the given audio format
+ * Get the name of the given audio format.
  *
- * \param i the audio format number
+ * \param i The audio format number.
  *
  * This returns a pointer to statically allocated memory so it
  * must not be freed by the caller.
  */
 const char *audio_format_name(int i)
 {
-       return i >= 0?  afl[i].name : "(none)";
+       assert(i >= 0 && i < ARRAY_SIZE(afl));
+       return afl[i].name;
 }
 
 /**