110 lines
3.0 KiB
Diff
110 lines
3.0 KiB
Diff
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
|
Date: Fri Nov 15 17:34:34 2024 +0100
|
|
Subject: Remove nethelp.c, nethelp.h.
|
|
Patch-mainline: Not yet
|
|
Git-repo: https://git.code.sf.net/p/sispmctl/git
|
|
Git-commit: 51b89cfea368ab696863cfe297a5706ad6274119
|
|
References:
|
|
|
|
Function sock_write_bytes is not used.
|
|
|
|
Addresses-Coverity-ID: 512012 Overflowed integer argument
|
|
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
|
Signed-off-by: Egbert Eich <eich@suse.de>
|
|
---
|
|
src/Makefile.am | 3 +--
|
|
src/nethelp.c | 46 ----------------------------------------------
|
|
src/nethelp.h | 6 ------
|
|
src/socket.c | 1 -
|
|
4 files changed, 1 insertion(+), 55 deletions(-)
|
|
diff --git a/src/Makefile.am b/src/Makefile.am
|
|
index 8056d6b..e130738 100644
|
|
--- a/src/Makefile.am
|
|
+++ b/src/Makefile.am
|
|
@@ -47,8 +47,7 @@ pkgdata3_DATA = \
|
|
endif
|
|
|
|
libsispmctl_la_SOURCES = \
|
|
- process.c sispm_ctl.c nethelp.c schedule.c socket.c \
|
|
- sispm_ctl.h nethelp.h socket.h
|
|
+ process.c sispm_ctl.c schedule.c socket.c sispm_ctl.h socket.h
|
|
|
|
sispmctl_SOURCES = main.c
|
|
|
|
diff --git a/src/nethelp.c b/src/nethelp.c
|
|
deleted file mode 100644
|
|
index 6d76f31..0000000
|
|
--- a/src/nethelp.c
|
|
+++ /dev/null
|
|
@@ -1,46 +0,0 @@
|
|
-/*
|
|
- Copyright (C) 2003 Evan Buswell
|
|
-
|
|
- Based on code from icecast 1.3.11
|
|
- sock.c: Copyright (C) 1999 Jack Moffitt, Barath Raghavan, and Alexander Haväng
|
|
-
|
|
- This program is free software; you can redistribute it and/or modify
|
|
- it under the terms of the GNU General Public License as published by
|
|
- the Free Software Foundation; either version 2 of the License, or
|
|
- (at your option) any later version.
|
|
-
|
|
- This program is distributed in the hope that it will be useful,
|
|
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
- GNU General Public License for more details.
|
|
-
|
|
- You should have received a copy of the GNU General Public License
|
|
- along with this program; if not, write to the Free Software
|
|
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
-*/
|
|
-
|
|
-#include <sys/socket.h>
|
|
-#include <sys/types.h>
|
|
-
|
|
-#ifndef MSG_NOSIGNAL
|
|
-#define MSG_NOSIGNAL 0
|
|
-#endif
|
|
-
|
|
-/*
|
|
- * Write len bytes from buff to the socket.
|
|
- * Returns the return value from send()
|
|
- */
|
|
-int sock_write_bytes(int sockfd, const unsigned char *buff, int len)
|
|
-{
|
|
- int t, n;
|
|
-
|
|
- for(t = 0 ; len > 0 ; ) {
|
|
- n = send(sockfd, (void *) buff + t, len, MSG_NOSIGNAL);
|
|
- if (n < 0) {
|
|
- return((t == 0) ? n : t);
|
|
- }
|
|
- t += n;
|
|
- len -= n;
|
|
- }
|
|
- return(t);
|
|
-}
|
|
diff --git a/src/nethelp.h b/src/nethelp.h
|
|
deleted file mode 100644
|
|
index 4ffb1e8..0000000
|
|
--- a/src/nethelp.h
|
|
+++ /dev/null
|
|
@@ -1,6 +0,0 @@
|
|
-#ifndef NETHELP_H
|
|
-#define NETHELP_H
|
|
-
|
|
-int sock_write_bytes(int sockfd, const unsigned char *buff, int len);
|
|
-
|
|
-#endif /* ! NETHELP_H */
|
|
diff --git a/src/socket.c b/src/socket.c
|
|
index 1956a13..0e76a99 100644
|
|
--- a/src/socket.c
|
|
+++ b/src/socket.c
|
|
@@ -37,7 +37,6 @@
|
|
#include <usb.h>
|
|
#include "sispm_ctl.h"
|
|
#include "socket.h"
|
|
-#include "nethelp.h"
|
|
|
|
#ifndef WEBLESS
|
|
int listenport=LISTENPORT;
|