]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/apcupsd-3.14.4-fix-gcc44.patch
Merge remote-tracking branch 'origin/kernel-update' into thirteen
[ipfire-2.x.git] / src / patches / apcupsd-3.14.4-fix-gcc44.patch
CommitLineData
fa21f636
MT
1diff -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);