Branch data Line data Source code
1 : : /* 2 : : * dpkg - main program for package management 3 : : * perpkgstate.c - struct perpackagestate and function handling 4 : : * 5 : : * Copyright © 1995 Ian Jackson <ijackson@chiark.greenend.org.uk> 6 : : * Copyright © 2000,2001 Wichert Akkerman <wakkerma@debian.org> 7 : : * Copyright © 2008-2014 Guillem Jover <guillem@debian.org> 8 : : * 9 : : * This is free software; you can redistribute it and/or modify 10 : : * it under the terms of the GNU General Public License as published by 11 : : * the Free Software Foundation; either version 2 of the License, or 12 : : * (at your option) any later version. 13 : : * 14 : : * This is distributed in the hope that it will be useful, 15 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 : : * GNU General Public License for more details. 18 : : * 19 : : * You should have received a copy of the GNU General Public License 20 : : * along with this program. If not, see <https://www.gnu.org/licenses/>. 21 : : */ 22 : : 23 : : #include <config.h> 24 : : #include <compat.h> 25 : : 26 : : #include <dpkg/dpkg.h> 27 : : #include <dpkg/dpkg-db.h> 28 : : 29 : : #include "main.h" 30 : : 31 : : void 32 : 0 : ensure_package_clientdata(struct pkginfo *pkg) 33 : : { 34 [ # # ]: 0 : if (pkg->clientdata) 35 : 0 : return; 36 : 0 : pkg->clientdata = nfmalloc(sizeof(*pkg->clientdata)); 37 : 0 : pkg->clientdata->istobe = PKG_ISTOBE_NORMAL; 38 : 0 : pkg->clientdata->color = PKG_CYCLE_WHITE; 39 : 0 : pkg->clientdata->enqueued = false; 40 : 0 : pkg->clientdata->replacingfilesandsaid = 0; 41 : 0 : pkg->clientdata->cmdline_seen = 0; 42 : 0 : pkg->clientdata->trigprocdeferred = NULL; 43 : : }