code: plan9front

Download patch

ref: 013b4983140cc2fbb7df9e3647e2e7c5d575a9dd
parent: dd86214d77a4abf9ac160c2c63ae1bb448a5ba2d
author: Sigrid <ftrvxmtrx@gmail.com>
date: Fri Apr 30 08:36:01 EDT 2021

libtags: use nelem

--- a/sys/src/cmd/audio/libtags/tags.c
+++ b/sys/src/cmd/audio/libtags/tags.c
@@ -65,7 +65,7 @@
 	ctx->found = 0;
 	ctx->format = Funknown;
 	res = -1;
-	for(i = 0; i < (int)(sizeof(g)/sizeof(g[0])); i++){
+	for(i = 0; i < nelem(g); i++){
 		ctx->num = 0;
 		if(g[i].f(ctx) == 0){
 			if(ctx->num > 0)