Clean up opt tools, ftrustee and nwbind warning cases
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
14
src/nwbind.c
14
src/nwbind.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user