Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-1764

Unify definitions of MAX() and MIN()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 3.3.2
    • Core
    • None

    Description

      There are a few duplications of these definitions, this would be splendid to unify into one definition for each (yes amc, I know there's std::max .

      loki (10:48) 892/0 $ tsg 'MAX\(' | grep define
      /home/leif/apache/trafficserver.git/proxy/PluginVC.cc: #define MAX(x,y) (((x) >= (y)) ? (x) : (y))
      /home/leif/apache/trafficserver.git/proxy/MuxVC.cc: #define MAX(x,y) (x >= y) ? x : y;
      /home/leif/apache/trafficserver.git/iocore/net/P_InkBulkIO.h: #define MAX(x, y) (x > y ? x : y)
      loki (10:48) 893/0 $ tsg 'MIN\(' | grep define
      /home/leif/apache/trafficserver.git/proxy/http/HttpTunnel.cc: #define MIN(x,y) ((x) <= (y)) ? (x) : (y);
      /home/leif/apache/trafficserver.git/proxy/PluginVC.cc: #define MIN(x,y) (((x) <= (y)) ? (x) : (y))
      /home/leif/apache/trafficserver.git/proxy/InkAPITestTool.cc: #define MIN(_x, _y) ((_x < _y) ? _x : _y)
      /home/leif/apache/trafficserver.git/proxy/MuxVC.cc: #define MIN(x,y) (x <= y) ? x : y;
      /home/leif/apache/trafficserver.git/example/thread-pool/psi.c: #define MIN(x,y) ((x < y) ? x :y)
      /home/leif/apache/trafficserver.git/iocore/net/NetVCTest.cc: #define MIN(x,y) (x <= y) ? x : y;
      

      Attachments

        Activity

          People

            zwoop Leif Hedstrom
            zwoop Leif Hedstrom
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: