maskit commented on code in PR #10907:
URL: https://github.com/apache/trafficserver/pull/10907#discussion_r1420764891


##########
plugins/xdebug/xdebug.cc:
##########
@@ -888,16 +888,19 @@ TSPluginInit(int argc, const char *argv[])
 
   // Make xDebugHeader available to other plugins, as a C-style string.
   //
-  int idx = -1;
-  TSReleaseAssert(TSUserArgIndexReserve(TS_USER_ARGS_GLB, "XDebugHeader", 
"XDebug header name", &idx) == TS_SUCCESS);
+  int idx  = -1;
+  auto ret = TSUserArgIndexReserve(TS_USER_ARGS_GLB, "XDebugHeader", "XDebug 
header name", &idx);
+  TSReleaseAssert(ret == TS_SUCCESS);
   TSReleaseAssert(idx >= 0);
   TSUserArgSet(nullptr, idx, const_cast<char *>(xDebugHeader.str));
 
   AuxDataMgr::init("xdebug");
 
   // Setup the global hook
-  TSReleaseAssert(XInjectHeadersCont = TSContCreate(XInjectResponseHeaders, 
nullptr));
-  TSReleaseAssert(XDeleteDebugHdrCont = TSContCreate(XDeleteDebugHdr, 
nullptr));

Review Comment:
   No, it's not about unintentional assignment. Coverity thinks assertions 
could be completely ignored (noop-ed). That is not true for us at the moment, 
but I think it's a good precaution.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to