Skip to content

CID 1518573: Unchecked return value #10358

@maskit

Description

@maskit
 48  switch (event) {
 49  case TS_EVENT_NET_ACCEPT:
 50    /* Create a new mutex for the TxnSM, which is going
 51       to handle the incoming request. */
 52    pmutex = TSMutexCreate();
 53    txn_sm = TxnSMCreate(pmutex, (TSVConn)edata, server_port);
 54
 55    /* This is no reason for not grabbing the lock.
 56       So skip the routine which handle LockTry failure case. */
   	
CID 1518573 (#1 of 1): Unchecked return value (CHECKED_RETURN)
2. check_return: Calling TSMutexLockTry without checking return value (as is done elsewhere 6 out of 7 times).
 57    TSMutexLockTry(pmutex); // TODO: why should it not check if we got the lock??
 58    TSContCall(txn_sm, TS_EVENT_NONE, nullptr);
 59    TSMutexUnlock(pmutex);
 60    break;

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions