GCC Code Coverage Report


Directory: ./
File: lib/my/my_printf/flag_s.c
Date: 2024-06-05 00:34:38
Exec Total Coverage
Lines: 8 8 100.0%
Functions: 1 1 100.0%
Branches: 2 2 100.0%

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2023
3 ** my_printf
4 ** File description:
5 ** Flag to print a %s (a string)
6 */
7 /**
8 * @file flag_s.c
9 * @brief The file containing the flag_s function
10 * @author Nicolas TORO
11 */
12
13 #include "myprintf.h"
14
15 15 int flag_s(va_list list, formating_t *formating)
16 {
17 15 char *temp = va_arg(list, char *);
18 15 char temp2[5000] = {0};
19
20
2/2
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 14 times.
15 if (temp == NULL)
21 1 return 0;
22 14 my_strcat(temp2, temp);
23 14 format_it_str(temp2, formating);
24 14 return my_putstr_fd(temp2, formating->fd);
25 }
26