GCC Code Coverage Report


Directory: ./
File: lib/my/my_putstr_sized.c
Date: 2024-06-05 00:36:48
Exec Total Coverage
Lines: 5 5 100.0%
Functions: 1 1 100.0%
Branches: 3 4 75.0%

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2023
3 ** my_putstr_limited
4 ** File description:
5 ** Write a string (str) in stdout with a defined size (size)
6 ** and returns the length of the printed string
7 */
8 /**
9 * @file my_putstr_sized.c
10 * @brief The file containing the my_putstr_sized function
11 * @author Nicolas TORO
12 */
13
14 #include "my.h"
15
16 2 int my_putstr_sized(char const *str, int size)
17 {
18
3/4
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
2 if (str == NULL || size < 1)
19 1 return 0;
20 1 write(1, str, size);
21 1 return size;
22 }
23