strncpy's third argument should be the length of the dest buffer, not the source.
[wmaker-crm.git] / WINGs / misc.c
blob76cf1f599e34b4a0903cae8659d18e1204b2f266
1 /* WUtil / misc.c
3 * Copyright (c) 2001 Dan Pascu
4 * Copyright (c) 2014 Window Maker Team
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 /* Miscelaneous helper functions */
23 #include <WUtil.h>
25 #include "error.h"
27 WMRange wmkrange(int start, int count)
29 WMRange range;
31 range.position = start;
32 range.count = count;
34 return range;
38 * wutil_shutdown - cleanup in WUtil when user program wants to exit
40 void wutil_shutdown(void)
42 #ifdef HAVE_SYSLOG
43 w_syslog_close();
44 #endif