GCC Code Coverage Report


Directory: ./
File: lib/my/my_printf/flag_s.c
Date: 2024-06-05 02:24:39
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 13 int flag_s(va_list list, formating_t *formating)
16 {
17 13 char *temp = va_arg(list, char *);
18 13 char temp2[5000] = {0};
19
20
2/2
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 12 times.
13 if (temp == NULL)
21 1 return 0;
22 12 my_strcat(temp2, temp);
23 12 format_it_str(temp2, formating);
24 12 return my_putstr_fd(temp2, formating->fd);
25 }
26