GCC Code Coverage Report


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