]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: global: remove unused definition of MAX_PROCS
authorWilly Tarreau <w@1wt.eu>
Tue, 15 Jun 2021 09:41:20 +0000 (11:41 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 15 Jun 2021 14:52:42 +0000 (16:52 +0200)
This one was forced to 1 and the only reference was a test to verify it
was comprised between 1 and LONGBITS.

include/haproxy/defaults.h
src/haproxy.c

index 72b35cc93fc1ca156441ac0f80c10426ef8ce2e1..3f6cbfd99502b01acfb9d605cdb3a6027d0453c3 100644 (file)
 #ifndef _HAPROXY_DEFAULTS_H
 #define _HAPROXY_DEFAULTS_H
 
-/* MAX_PROCS defines the highest limit for the global "nbproc" value. It
- * defaults to the number of bits in a long integer but may be lowered to save
- * resources on embedded systems.
- */
-#ifndef MAX_PROCS
-#define MAX_PROCS 1
-#endif
-
 /* MAX_THREADS defines the highest limit for the global nbthread value. It
  * defaults to the number of bits in a long integer when threads are enabled
  * but may be lowered to save resources on embedded systems.
index f520e1ac9061d9c73a4fc331962425d6a88b3fc2..a507ec94318e0a28d2370142dc6978803b975807 100644 (file)
@@ -2854,16 +2854,6 @@ int main(int argc, char **argv)
 
        setvbuf(stdout, NULL, _IONBF, 0);
 
-       /* this can only safely be done here, though it's optimized away by
-        * the compiler.
-        */
-       if (MAX_PROCS < 1 || MAX_PROCS > LONGBITS) {
-               ha_alert("MAX_PROCS value must be between 1 and %d inclusive; "
-                        "HAProxy was built with value %d, please fix it and rebuild.\n",
-                        LONGBITS, MAX_PROCS);
-               exit(1);
-       }
-
        /* take a copy of initial limits before we possibly change them */
        getrlimit(RLIMIT_NOFILE, &limit);