summaryrefslogtreecommitdiff
path: root/src/libdatastruct/genqdyn_clean.c
blob: 9564d513ae0aabc56432e702fb3df40eaf1aaa8c (plain)
1
2
3
4
5
6
7
8
9
10
11
/* ISC license. */

#include <string.h>
#include "genqdyn-internal.h"

void genqdyn_clean (genqdyn *g)
{
  memmove(g->queue.s, g->queue.s + g->head, g->queue.len - g->head) ;
  g->queue.len -= g->head ;
  g->head = 0 ;
}