]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/apcupsd-3.14.4-fix-gcc44.patch
Merge branch 'kernel-update' of ssh://git.ipfire.org/pub/git/ipfire-2.x into kernel...
[people/teissler/ipfire-2.x.git] / src / patches / apcupsd-3.14.4-fix-gcc44.patch
1 diff -up apcupsd-3.14.5/src/apcaccess.c.gcc44 apcupsd-3.14.5/src/apcaccess.c
2 --- apcupsd-3.14.5/src/apcaccess.c.gcc44 2009-02-24 10:36:35.781325750 +0100
3 +++ apcupsd-3.14.5/src/apcaccess.c 2009-02-24 10:38:12.416285478 +0100
4 @@ -86,10 +86,10 @@ int main(int argc, char **argv)
5 }
6
7 if (argc > 2) { /* assume host:port */
8 - char *p;
9 + char *p = argv[2];
10
11 - host = argv[2];
12 - p = strchr(host, ':');
13 + host = p;
14 + p = strchr(p, ':');
15 if (p) {
16 *p++ = 0;
17 port = atoi(p);