Coverage Report

Created: 2023-06-07 06:15

/src/neomutt/attach/private_data.c
Line
Count
Source (jump to first uncovered line)
1
/**
2
 * @file
3
 * Private state data for Attachments
4
 *
5
 * @authors
6
 * Copyright (C) 2022 Richard Russon <rich@flatcap.org>
7
 *
8
 * @copyright
9
 * This program is free software: you can redistribute it and/or modify it under
10
 * the terms of the GNU General Public License as published by the Free Software
11
 * Foundation, either version 2 of the License, or (at your option) any later
12
 * version.
13
 *
14
 * This program is distributed in the hope that it will be useful, but WITHOUT
15
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
17
 * details.
18
 *
19
 * You should have received a copy of the GNU General Public License along with
20
 * this program.  If not, see <http://www.gnu.org/licenses/>.
21
 */
22
23
/**
24
 * @page attach_private_data Private state data for Attachments
25
 *
26
 * Private state data for Attachments
27
 */
28
29
#include "config.h"
30
#include "mutt/lib.h"
31
#include "private_data.h"
32
33
/**
34
 * attach_private_data_free - Free Attach Data - Implements Menu::mdata_free() - @ingroup menu_mdata_free
35
 * @param menu Menu
36
 * @param ptr  Attach Data to free
37
 */
38
void attach_private_data_free(struct Menu *menu, void **ptr)
39
0
{
40
0
  if (!ptr || !*ptr)
41
0
    return;
42
43
0
  FREE(ptr);
44
0
}
45
46
/**
47
 * attach_private_data_new - Create new Attach Data
48
 * @retval ptr New AttachPrivateData
49
 */
50
struct AttachPrivateData *attach_private_data_new(void)
51
0
{
52
0
  struct AttachPrivateData *priv = mutt_mem_calloc(1, sizeof(struct AttachPrivateData));
53
54
0
  return priv;
55
0
}