diff mbox series

[16/25] libnfs.c: fix a few simple compile warnings

Message ID 20220209222610.438470-17-mcgrof@kernel.org (mailing list archive)
State New, archived
Headers show
Series dbench: fix compile warnings and update a bit | expand

Commit Message

Luis Chamberlain Feb. 9, 2022, 10:26 p.m. UTC
Like including dbench.h first so GNUSOURCE is defined and
return is not needed.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 libnfs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libnfs.c b/libnfs.c
index e853e47..1600701 100644
--- a/libnfs.c
+++ b/libnfs.c
@@ -17,10 +17,11 @@ 
    along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 #define _FILE_OFFSET_BITS 64
-#include <thread_db.h>
+#include "dbench.h"
 #include "mount.h"
 #include "nfs.h"
 #include "libnfs.h"
+#include <thread_db.h>
 #include <stdint.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -123,8 +124,7 @@  static data_t *recursive_lookup_fhandle(struct nfsio *nfsio, const char *name)
 	if (t != NULL) {
 		return &t->fh;
 	}
-
-	return ;
+	return NULL;
 }
 
 static data_t *lookup_fhandle(struct nfsio *nfsio, const char *name, off_t *off)
@@ -392,7 +392,6 @@  struct nfsio *nfsio_connect(const char *server, const char *export, const char *
 	mountres3 *mountres;
 	fhandle3 *fh;
         struct sockaddr_in sin;
-	int ret;
 
 	nfsio = malloc(sizeof(struct nfsio));
 	if (nfsio == NULL) {