-
Notifications
You must be signed in to change notification settings - Fork 0
/
del_q_static.c
executable file
·34 lines (31 loc) · 1.1 KB
/
del_q_static.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* del_q_static.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ioleksiu <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/08/15 20:01:28 by ioleksiu #+# #+# */
/* Updated: 2017/08/15 20:01:39 by ioleksiu ### ########.fr */
/* */
/* ************************************************************************** */
#include "lem_in.h"
void del_q_static(int *q, int size)
{
int i;
i = 0;
if (q[size - 1] != -1)
{
q[size - 1] = -1;
return ;
}
while (i < size - 1)
{
if (q[i + 1] == -1)
{
q[i] = -1;
return ;
}
i++;
}
}