Commit 07b41096 authored by koennecke's avatar koennecke
Browse files

Removed the unnecessary access to hmcontrol in MakeFA

parent a57f8684
......@@ -14,7 +14,11 @@
Added focusraw command for retrieving single detector banks in support
of the colour mapping part of the FOCUS status display.
Mark Koennecke, July 2001
Mark Koennecke, July 2001
Removed unnecessary access to hmc
Mark Koennecke, August 2018
---------------------------------------------------------------------------*/
#include <stdlib.h>
#include <assert.h>
......@@ -323,7 +327,6 @@ int MakeFA(SConnection * pCon, SicsInterp * pSics, void *pData,
int argc, char *argv[])
{
pFocusAverager pNew = NULL;
CommandList *pCom = NULL;
pDummy pDum = NULL;
char pBueffel[256];
int iRet;
......@@ -338,31 +341,12 @@ int MakeFA(SConnection * pCon, SicsInterp * pSics, void *pData,
/* we need two parameters: the name for the averager and the histogram
memory
*/
if (argc < 3) {
if (argc < 2) {
SCWrite(pCon, "ERROR: Insufficient number of parameters to MakeFA",
eError);
return 0;
}
/* find histogram memory */
pCom = FindCommand(pSics, argv[2]);
if (!pCom) {
snprintf(pBueffel,255, "ERROR: histogram memory %s NOT found!", argv[2]);
SCWrite(pCon, pBueffel, eError);
return 0;
}
pDum = (pDummy) pCom->pData;
if (!pDum) {
snprintf(pBueffel,255, "ERROR: histogram memory %s INVALID!", argv[2]);
SCWrite(pCon, pBueffel, eError);
return 0;
}
if (strcmp(pDum->pDescriptor->name, "HMcontrol") != 0) {
snprintf(pBueffel,255, "ERROR: %s is NO histogram control object!",
argv[2]);
SCWrite(pCon, pBueffel, eError);
return 0;
}
/* we got what we need: set things up */
pNew = (pFocusAverager) malloc(sizeof(FocusAverager));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment