Clean up opt tools, ftrustee and nwbind warning cases

This commit is contained in:
Mario Fetka
2026-04-20 23:39:42 +02:00
parent 77587a0789
commit 143096999f
4 changed files with 10 additions and 10 deletions

View File

@@ -41,7 +41,7 @@ add_executable( comm comm.c )
add_executable( sendm sendm.c )
add_executable( unxcomm unxcomm.c )
add_executable( unxsendm unxsendm.c )
# add_executable( xsockrt xsockrt.c )
add_executable( xsockrt xsockrt.c )
#################################
# Linking

View File

@@ -40,7 +40,7 @@ int main(int argc, char *argv[])
sprintf(path, "/usr/bin/sendmail %s", buf);
f=popen(path, "w");
if (NULL != f) {
write(1, "+++++\n", 6);
if (write(1, "+++++\n", 6) < 0) {}
while (0 < (size=bl_read(0, buf, sizeof(buf)))){
fwrite(buf, size, 1, f);
}

View File

@@ -206,7 +206,7 @@ int do_export_trustees(char *expfn)
j, v->sysname, v->unixname, fn);
if (NULL != (f=fopen(fn, "w")) ) {
chmod(fn, 0600);
chown(fn, 0, 0);
if (chown(fn, 0, 0)) {}
fclose(f);

View File

@@ -67,19 +67,19 @@ static void write_to_nwserv(int what, int connection, int mode,
case 0x4444 : /* tell the wdog there's no need to look 0 */
/* activate wdogs to free connection 1 */
/* the connection ist closed 99 */
write(FD_NWSERV, &what, sizeof(int));
write(FD_NWSERV, &connection, sizeof(int));
write(FD_NWSERV, &mode, sizeof(int));
if (write(FD_NWSERV, &what, sizeof(int)) < 0) {}
if (write(FD_NWSERV, &connection, sizeof(int)) < 0) {}
if (write(FD_NWSERV, &mode, sizeof(int)) < 0) {}
break;
case 0x6666 : /* send to client that server holds message */
write(FD_NWSERV, &what, sizeof(int));
write(FD_NWSERV, &connection, sizeof(int));
if (write(FD_NWSERV, &what, sizeof(int)) < 0) {}
if (write(FD_NWSERV, &connection, sizeof(int)) < 0) {}
break;
case 0xffff : /* tell nwserv to down the server */
write(FD_NWSERV, &what, sizeof(int));
write(FD_NWSERV, &what, sizeof(int));
if (write(FD_NWSERV, &what, sizeof(int)) < 0) {}
if (write(FD_NWSERV, &what, sizeof(int)) < 0) {}
break;
default : break;