pop off the topmost command from the command queue. * caller is responsible for freeing the returned _cmd_queue. */
| 407 | * caller is responsible for freeing the returned _cmd_queue. |
| 408 | */ |
| 409 | struct _cmd_queue * |
| 410 | cmdq_pop(void) |
| 411 | { |
| 412 | int q = (gi.in_doagain) ? CQ_REPEAT : CQ_CANNED; |
| 413 | struct _cmd_queue *tmp = gc.command_queue[q]; |
| 414 | |
| 415 | if (tmp) { |
| 416 | gc.command_queue[q] = tmp->next; |
| 417 | tmp->next = NULL; |
| 418 | } |
| 419 | return tmp; |
| 420 | } |
| 421 | |
| 422 | /* get the top entry without popping it */ |
| 423 | struct _cmd_queue * |
no outgoing calls
no test coverage detected