summaryrefslogtreecommitdiffstats
path: root/ax25
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Update all references to the FSF's address.Ralf Baechle2019-04-113-3/+6
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Fix transformation by bad cleanupRalf Baechle2019-03-281-3/+2
| | | | | | | | | 6afad7276402 ("Delete more assignments in if conditions.") has a manual edit and that promptly went wrong. Fixes: 6afad7276402 ("Delete more assignments in if conditions.") Reported-by: Thomas Osterried <ax25@x-berg.in-berlin.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Man pages: Update with date from last non-trivial change.Ralf Baechle2019-03-2813-13/+13
| | | | | | | | | In some of these pages the content was changed relativly recently but the date in the man page itself was never updated so dates were off by decades. Update all man pages to last non-trival change recorded in git since imported. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Rename README file to README.axgetput.Ralf Baechle2019-03-282-1/+1
| | | | | | | | The README file was conflicting with the README files in the root directory so only the of the files ended up getting installed on "make install" or when packaging. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25getput: Distribute TIPS.txt.Ralf Baechle2019-03-201-0/+1
| | | | | | | While add it force the distribution of README and TODO in the same directory instead of relying on automake's default behaviour. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Delete duplicate inclusion of <sys/types.h>Ralf Baechle2017-08-081-1/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25.4: Fix reference to non-existing man page.Ralf Baechle2017-08-031-2/+2
| | | | | | There is no axparms(5) man page but axports(5) would make sense. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Delete more assignments in if conditions.Ralf Baechle2017-08-034-32/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on below coccinelle script with a bad transformation fixed up manually. @if1@ expression E, F, G; binary operator X; statement S; @@ - if ((E = F) X G) + E = F; + if (E X G) S @if2@ expression E, F, G; binary operator X; statement S; @@ - if (G X (E = F)) + E = F; + if (E X G) S @if3@ expression E, F; statement S; @@ - if (!(E = F)) + E = F; + if (!E) S @if4@ expression E, F; statement S; @@ - if ((E = F)) + E = F; + if (E) S Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* treewide: Remove casts of a type to the same type.Ralf Baechle2017-08-031-1/+1
| | | | | | | | | | | | | This is using the following semantic patch: @identitycast@ type T; T *A; @@ - (T *) A + A Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* treewide: Remove useless casts from memset pointer argument.Ralf Baechle2017-08-032-5/+5
| | | | | | | | | | | | | This is using the following semantic patch: @memset@ type T; expression A, B, C; @@ - memset((T *)A, B, C) + memset(A, B, C) Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* treewide: Kill assignments in if conditions.Ralf Baechle2017-07-3112-87/+181
| | | | | | | | | | | | | | | | | | | | Somewhat hard to read and the code base already has many overlong lines. Found with below spatch file and some manual editing in ax25/access.c to restore a comment lost by spatch. @parens@ expression E, F, G; binary operator X; statement S; @@ - if ((E = F) X G) + E = F; + if (E X G) S Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axwrapper: Compute nfds argument of select() instead of using a constant.Ralf Baechle2017-07-261-1/+10
| | | | | | | In particular this remove reliance on how file descriptors are assigned and ensures we don't pass an unnecessarily high nfds argument to select. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axwrapper: Remove unused code resulting in warning.Ralf Baechle2017-07-261-7/+0
| | | | | | | | | | | | | | | | | gcc -g -O2 -Wall -o axspawn axspawn.o access.o md5.o -lax25 -lutil gcc -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/us r/local/var/ax25/"\" -g -O2 -Wall -MT axwrapper.o -MD -MP -MF .deps/axwrapper.Tpo -c -o axwrapper.o axwrapper.c axwrapper.c:49:13: warning: ‘sigchld_handler’ defined but not used [-Wunused-function] static void sigchld_handler(int sig) ^~~~~~~~~~~~~~~ Since 71918b7d4e95 ("axwrapper: Mark functions sigchld_handler and convert_{cr_lf,lf_cr} static.") made sigchld_handler() static gcc was warning about the function being unused. No point in keeping this around; SIGCHLD is perfectly fine. Fixes: 71918b7d4e95 ("axwrapper: Mark functions sigchld_handler and convert_{cr_lf,lf_cr} static.") Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axwrapper: Handle EINTR error return from select().Ralf Baechle2017-07-261-0/+3
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axwrapper: Delete FILES section from man page.Ralf Baechle2017-07-261-1/+0
| | | | | | No files were listed in the FILES section. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25: Delete useless casts of malloc's return value.Ralf Baechle2017-02-062-17/+17
| | | | | | | | | | | | | | | malloc returns a void pointer so no cast is necessary when assigning to a pointer type. Found with below coccinelle script: @malloccast@ type T; @@ - (T *) malloc(...) Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Don't check for negative return from strlen.Ralf Baechle2017-02-061-1/+1
| | | | | | | | For one strlen does not return any errors. By its very nature strlen does not return negative results and its return type is size_t which happens to be unsigned. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* mheard: Drop unsatisfiable conditions.Ralf Baechle2017-02-061-2/+2
| | | | | | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -Wextra -MT mheard.o -MD -MP -MF .deps/mheard.Tpo -c -o mheard.o mheard.c [...] mheard.c:135:22: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (pr->entry.type < 0 || pr->entry.type > sizeof(types)) ^ mheard.c:168:22: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (pr->entry.type < 0 || pr->entry.type > sizeof(types)) ^ [...] Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25d: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-2/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axwrapper: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-2/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-6/+6
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-11/+12
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-7/+7
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* mheard: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-5/+5
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Make function calc_crc static.Ralf Baechle2017-02-061-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Include util.h into utilc for the prototypes.Ralf Baechle2017-02-061-0/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Make do_version static.Ralf Baechle2017-02-061-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Move definition of several array from a .h to a .c file.Ralf Baechle2017-02-062-3/+7
| | | | | | And add proper declarations to the header file. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25d: Reorder code to avoid the need for forward declarations.Ralf Baechle2017-02-061-461/+454
| | | | | | And then delete those now useless declarations. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25d: Make several functions static.Ralf Baechle2017-02-061-4/+7
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axparms: Make several functions static.Ralf Baechle2017-02-061-9/+9
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Remove unused function Xtoupper().Ralf Baechle2017-02-061-9/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Sort out homebrew declaration of forkpty(3).Ralf Baechle2017-02-061-9/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Make many functions and variables static.Ralf Baechle2017-02-061-42/+38
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Move calc_md5_pw to eleminate need for declaration and make static.Ralf Baechle2017-02-061-30/+29
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Make several functions and variables static.Ralf Baechle2017-02-061-11/+8
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axwrapper: Mark functions sigchld_handler and convert_{cr_lf,lf_cr} static.Ralf Baechle2017-02-061-3/+3
| | | | | | | | This results in a new warning about sigchld_handler() being unused which is because the caller is currently commented out which we leave to be sorted out later. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* bpqparms: Fix excessive indentation in usage().Ralf Baechle2017-02-061-4/+4
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* bpqparms: Make functions usage and get_hwaddr static.Ralf Baechle2017-02-061-2/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Remove support for !defined(__GLIBC__) and __GLIBC__ != 2.Ralf Baechle2017-02-063-14/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Sort out pointer signedness mess.Ralf Baechle2017-01-261-3/+4
| | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT axspawn.o -MD -MP -MF .deps/axspawn.Tpo -c -o axspawn.o axspawn.c axspawn.c: In function ‘encstathuf’: axspawn.c:555:15: warning: overflow in implicit constant conversion [-Woverflow] dest[0] = 255; ^~~ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Use the right way to get the required feature set from glibc.Ralf Baechle2017-01-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __USE_XOPEN doesn't work to get ptsname() etc. from libc. This is Linux-specific software so convert to _GNU_SOURCE. make[2]: Entering directory '/home/ralf/src/ax25/ax25-tools/kiss' gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O 2 -Wall -pedantic -MT kissattach.o -MD -MP -MF .deps/kissattach.Tpo -c -o kissattach.o kissattach.c kissattach.c: In function ‘main’: kissattach.c:312:18: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration] if ((namepts = ptsname(fd)) == NULL) { ^~~~~~~ kissattach.c:312:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion] if ((namepts = ptsname(fd)) == NULL) { ^ kissattach.c:317:7: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration] if (unlockpt(fd) == -1) { ^~~~~~~~ [...] gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT kissnetd.o -MD -MP -MF .deps/kissnetd.Tpo -c -o kissnetd.o kissnetd.c kissnetd.c: In function ‘ReopenPort’: kissnetd.c:134:16: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration] if ((npts = ptsname(PortList[PortNumber]->Fd)) == NULL) { ^~~~~~~ kissnetd.c:134:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion] if ((npts = ptsname(PortList[PortNumber]->Fd)) == NULL) { ^ kissnetd.c:143:8: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration] if (unlockpt(PortList[PortNumber]->Fd) == -1) { ^~~~~~~~ [...] gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT mkiss.o -MD -MP -MF .deps/mkiss.Tpo -c -o mkiss.o mkiss.c mkiss.c: In function ‘poll’: mkiss.c:68:15: warning: overflow in implicit constant conversion [-Woverflow] #define FEND 0300 /* Frame End (0xC0) */ ^ mkiss.c:149:14: note: in expansion of macro ‘FEND’ buffer[0] = FEND; ^~~~ mkiss.c:68:15: warning: overflow in implicit constant conversion [-Woverflow] #define FEND 0300 /* Frame End (0xC0) */ ^ mkiss.c:151:14: note: in expansion of macro ‘FEND’ buffer[2] = FEND; ^~~~ mkiss.c: In function ‘main’: mkiss.c:568:16: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration] if ((npts = ptsname(pty[i]->fd)) == NULL) { ^~~~~~~ mkiss.c:568:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion] if ((npts = ptsname(pty[i]->fd)) == NULL) { ^ mkiss.c:578:8: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration] if (unlockpt(pty[i]->fd) == -1) { ^~~~~~~~ mkiss.c:672:33: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=] syslog(LOG_ERR, "tty->fd: %m"); ^ mkiss.c:698:38: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=] syslog(LOG_ERR, "pty[%d]->fd: %m\n", i); [...] ^ gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT net2kiss.o -MD -MP -MF .deps/net2kiss.Tpo -c -o net2kiss.o net2kiss.c net2kiss.c: In function ‘main’: net2kiss.c:630:18: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration] if ((namepts = ptsname(fdpty)) == NULL) { ^~~~~~~ net2kiss.c:630:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion] if ((namepts = ptsname(fdpty)) == NULL) { ^ net2kiss.c:635:7: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration] if (unlockpt(fdpty) == -1) { ^~~~~~~~ [...] gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT m6pack.o -MD -MP -MF .deps/m6pack.Tpo -c -o m6pack.o m6pack.c m6pack.c: In function ‘main’: m6pack.c:537:16: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration] if ((npts = ptsname(pty[i]->fd)) == NULL) { ^~~~~~~ m6pack.c:537:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion] if ((npts = ptsname(pty[i]->fd)) == NULL) { ^ m6pack.c:545:8: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration] if (unlockpt(pty[i]->fd) == -1) { ^~~~~~~~ m6pack.c:626:33: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=] syslog(LOG_ERR, "tty->fd: %m"); ^ m6pack.c:658:29: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=] "pty[%d]->fd: %m\n",i); ^ [...] Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* beacon: Fix confusing indentation.Ralf Baechle2017-01-261-1/+4
| | | | | | | | | | | | beacon.c: In function ‘main’: beacon.c:146:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (addr != NULL) free(addr); addr = NULL; ^~ beacon.c:146:32: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ if (addr != NULL) free(addr); addr = NULL; ^~~~ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* beacon: Fix confusing indentation.Ralf Baechle2017-01-261-1/+4
| | | | | | | | | | | | beacon.c: In function ‘main’: beacon.c:128:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (addr != NULL) free(addr); addr = NULL; ^~ beacon.c:128:32: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ if (addr != NULL) free(addr); addr = NULL; ^~~~ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Fix missleading indentation.Ralf Baechle2017-01-261-1/+1
| | | | | | | | | | | axspawn.c:1777:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (pw->pw_dir && *(pw->pw_dir)) ^~ axspawn.c:1779:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ ret = chdir(p); ^~~ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Add a git suffix to the version number used by all programs.Ralf Baechle2017-01-249-10/+20
| | | | | | | This uses a setlocalversion script derived from the kernel's scripts/setlocalversion. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* mheardd: Delete duplicate inclusion of <config.h>.Ralf Baechle2017-01-231-1/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axparms: Fix name of bpqether proc file in man page.Ralf Baechle2017-01-191-1/+1
| | | | | | | As far as I can track this back in history /proc/net/ax25_bpqether has never been correct. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Makefile.am: axwapper.8 was not in the list of the man pages to be installed.Thomas Osterried2016-11-161-2/+2
| | | | Signed-off-by: Thomas Osterried <ax25@x-berg.in-berlin.de>