You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/10/23 17:13:39 UTC

[incubator-nuttx-apps] 07/07: netutils/thttpd: remove MIN and MAX definitions from libhttpd.c

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 5862b9d15cbaf570a2e8166b440bb0044f45c443
Author: Petro Karashchenko <pe...@gmail.com>
AuthorDate: Sun Oct 23 12:09:04 2022 +0200

    netutils/thttpd: remove MIN and MAX definitions from libhttpd.c
    
    This reverts commit e12d48f0d240edbd6934aac373242fe6b9b9aad2.
---
 examples/ajoystick/ajoy_main.c      | 1 +
 examples/djoystick/djoy_main.c      | 1 +
 examples/nunchuck/nunchuck_main.c   | 1 +
 examples/zerocross/zerocross_main.c | 1 +
 netutils/thttpd/libhttpd.c          | 8 --------
 netutils/thttpd/libhttpd.h          | 2 ++
 6 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/examples/ajoystick/ajoy_main.c b/examples/ajoystick/ajoy_main.c
index 398a787a9..c421328a4 100644
--- a/examples/ajoystick/ajoy_main.c
+++ b/examples/ajoystick/ajoy_main.c
@@ -59,6 +59,7 @@
 #ifndef MIN
 #  define MIN(a,b) ((a) < (b) ? (a) : (b))
 #endif
+
 #ifndef MAX
 #  define MAX(a,b) ((a) > (b) ? (a) : (b))
 #endif
diff --git a/examples/djoystick/djoy_main.c b/examples/djoystick/djoy_main.c
index 39f809782..54d72d9e1 100644
--- a/examples/djoystick/djoy_main.c
+++ b/examples/djoystick/djoy_main.c
@@ -56,6 +56,7 @@
 #ifndef MIN
 #  define MIN(a,b) ((a) < (b) ? (a) : (b))
 #endif
+
 #ifndef MAX
 #  define MAX(a,b) ((a) > (b) ? (a) : (b))
 #endif
diff --git a/examples/nunchuck/nunchuck_main.c b/examples/nunchuck/nunchuck_main.c
index 2e28ebbc7..c0e1a2059 100644
--- a/examples/nunchuck/nunchuck_main.c
+++ b/examples/nunchuck/nunchuck_main.c
@@ -55,6 +55,7 @@
 #ifndef MIN
 #  define MIN(a,b) ((a) < (b) ? (a) : (b))
 #endif
+
 #ifndef MAX
 #  define MAX(a,b) ((a) > (b) ? (a) : (b))
 #endif
diff --git a/examples/zerocross/zerocross_main.c b/examples/zerocross/zerocross_main.c
index a7dc72b56..c96f8b24b 100644
--- a/examples/zerocross/zerocross_main.c
+++ b/examples/zerocross/zerocross_main.c
@@ -56,6 +56,7 @@
 #ifndef MIN
 #  define MIN(a,b) ((a) < (b) ? (a) : (b))
 #endif
+
 #ifndef MAX
 #  define MAX(a,b) ((a) > (b) ? (a) : (b))
 #endif
diff --git a/netutils/thttpd/libhttpd.c b/netutils/thttpd/libhttpd.c
index 30ea11411..7e31d2cbf 100644
--- a/netutils/thttpd/libhttpd.c
+++ b/netutils/thttpd/libhttpd.c
@@ -92,14 +92,6 @@
 
 extern CODE char *crypt(const char *key, const char *setting);
 
-#ifndef MAX
-#  define MAX(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
-#ifndef MIN
-#  define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
-
 /* Conditional macro to allow two alternate forms for use in the built-in
  * error pages.  If EXPLICIT_ERROR_PAGES is defined, the second and more
  * explicit error form is used; otherwise, the first and more generic
diff --git a/netutils/thttpd/libhttpd.h b/netutils/thttpd/libhttpd.h
index fd0e657e8..a4e7f38b6 100644
--- a/netutils/thttpd/libhttpd.h
+++ b/netutils/thttpd/libhttpd.h
@@ -55,6 +55,7 @@
 #include <time.h>
 
 #include "config.h"
+
 #ifdef CONFIG_THTTPD
 
 /****************************************************************************
@@ -66,6 +67,7 @@
 #ifndef MAX
 #  define MAX(a,b) ((a) > (b) ? (a) : (b))
 #endif
+
 #ifndef MIN
 #  define MIN(a,b) ((a) < (b) ? (a) : (b))
 #endif