+       const char *sampler = num_samples ? "sampler2DMS" : "sampler2DRect";
+       const char *extension = num_samples ?
+               "#extension GL_ARB_texture_multisample : require" : "";
+        unsigned frag_alloc_len =
+                strlen(frag_template) + strlen(sampler) +
strlen(extension) + 4;
+        char *frag_1 = (char *) malloc(frag_alloc_len);
+        sprintf(frag_1, frag_template, extension, sampler,
+               num_samples ? ", i" : "");

This would be clearer with asprintf
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to