Permalink
Browse files

buf_size -> len

  • Loading branch information...
tj committed Jan 31, 2012
1 parent 5a8083d commit 959009b8849bc8fb42276416ea69d7e10826764b
Showing with 4 additions and 4 deletions.
  1. +3 −3 src/color.cc
  2. +1 −1 src/color.h
View
@@ -243,14 +243,14 @@ rgba_create(uint32_t rgba) {
*/
void
-rgba_to_string(rgba_t rgba, char *buf, size_t buf_size) {
+rgba_to_string(rgba_t rgba, char *buf, size_t len) {
if (1 == rgba.a) {
- snprintf(buf, buf_size, "#%.2x%.2x%.2x"
+ snprintf(buf, len, "#%.2x%.2x%.2x"
, (int) (rgba.r * 255)
, (int) (rgba.g * 255)
, (int) (rgba.b * 255));
} else {
- snprintf(buf, buf_size, "rgba(%d, %d, %d, %.2f)"
+ snprintf(buf, len, "rgba(%d, %d, %d, %.2f)"
, (int) (rgba.r * 255)
, (int) (rgba.g * 255)
, (int) (rgba.b * 255)
View
@@ -32,7 +32,7 @@ int32_t
rgba_from_string(const char *str, short *ok);
void
-rgba_to_string(rgba_t rgba, char *buf, size_t buf_size);
+rgba_to_string(rgba_t rgba, char *buf, size_t len);
void
rgba_inspect(int32_t rgba);

0 comments on commit 959009b

Please sign in to comment.