Changeset 9259d20 in mainline for uspace/lib/gfx/src
- 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)
- Location:
- uspace/lib/gfx/src
- Files:
-
- 1 added
- 2 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 -
uspace/lib/gfx/src/context.c
r045186b r9259d20 64 64 /** Delete graphics context. 65 65 * 66 * @param gc Graphics context 66 * @param gc Graphics context or @c NULL 67 67 */ 68 68 errno_t gfx_context_delete(gfx_context_t *gc) 69 69 { 70 if (gc == NULL) 71 return EOK; 72 70 73 free(gc); 71 74 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.