Changeset 9259d20 in mainline for uspace/lib/gfx/src/color.c
- Timestamp:
- 2019-04-16T09:15:55Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3e828ea
- Parents:
- 045186b
- git-author:
- Jiri Svoboda <jiri@…> (2019-04-15 17:15:29)
- git-committer:
- Jiri Svoboda <jiri@…> (2019-04-16 09:15:55)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gfx/src/color.c
r045186b r9259d20 36 36 #include <gfx/color.h> 37 37 #include <stdint.h> 38 #include <stdlib.h> 39 #include "private/color.h" 38 40 39 41 /** Create new 16-bit per channel RGB color. … … 53 55 gfx_color_t **rcolor) 54 56 { 57 gfx_color_t *color; 58 59 color = calloc(1, sizeof(gfx_color_t)); 60 if (color == NULL) 61 return ENOMEM; 62 63 color->r = r; 64 color->g = g; 65 color->b = b; 66 67 *rcolor = color; 55 68 return EOK; 56 69 } … … 62 75 void gfx_color_delete(gfx_color_t *color) 63 76 { 64 (void) color;77 free(color); 65 78 } 66 79
Note:
See TracChangeset
for help on using the changeset viewer.