summaryrefslogtreecommitdiff
path: root/sysutils/xbatt/patches/patch-ab
blob: e20831e572962189a08675babccaefe5172eb2fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$NetBSD: patch-ab,v 1.2 2001/11/26 20:02:36 wiz Exp $

--- xbatt.c.orig	Fri Sep 18 14:03:05 1998
+++ xbatt.c
@@ -219,6 +219,7 @@
 String fallback_resouces[] = {
     "*width: 39",
     "*height: 39",
+    NULL
 };
 
 main(
@@ -494,6 +495,7 @@
 
 #ifdef __NetBSD__
     struct apm_power_info info;
+    memset(&info, 0, sizeof(info));
     if( ioctl(apmfd, APM_IOC_GETPOWER, &info) == -1 ) {
 	fprintf(stderr, "xbatt: ioctl APM_IOC_GETPOWER failed\n");
 	exit(1);