| 933 | */ |
| 934 | |
| 935 | static _cups_ps_obj_t * /* O - New object */ |
| 936 | push_stack(_cups_ps_stack_t *st, /* I - Stack */ |
| 937 | _cups_ps_obj_t *obj) /* I - Object */ |
| 938 | { |
| 939 | _cups_ps_obj_t *temp; /* New object */ |
| 940 | |
| 941 | |
| 942 | if (st->num_objs >= st->alloc_objs) |
| 943 | { |
| 944 | |
| 945 | |
| 946 | st->alloc_objs += 32; |
| 947 | |
| 948 | if ((temp = realloc(st->objs, (size_t)st->alloc_objs * |
| 949 | sizeof(_cups_ps_obj_t))) == NULL) |
| 950 | return (NULL); |
| 951 | |
| 952 | st->objs = temp; |
| 953 | memset(temp + st->num_objs, 0, 32 * sizeof(_cups_ps_obj_t)); |
| 954 | } |
| 955 | |
| 956 | temp = st->objs + st->num_objs; |
| 957 | st->num_objs ++; |
| 958 | |
| 959 | memcpy(temp, obj, sizeof(_cups_ps_obj_t)); |
| 960 | |
| 961 | return (temp); |
| 962 | } |
| 963 | |
| 964 | |
| 965 | /* |
no outgoing calls
no test coverage detected