Opened 4 years ago

Last modified 2 years ago

#3169 new defect

Replace use of char* with void* cast in buffer bindings in dhcspsrv/mysql_lease_mgr.cc

Reported by: tmark Owned by:
Priority: very low Milestone: Outstanding Tasks
Component: database-backend Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

While reviewing trac# 3147, Stephen had the following comment:

I note that in all cases, when the MYSQL_BIND "buffer" variable is assigned, the rvalue is cast to "char*".  I'm not certain why I did that (I wrote the original code); looking at the [http://dev.mysql.com/doc/refman/5.5/en/c-api-prepared-statement-data-structures.html MySQl documentation] and the definition of MYSQL_BIND in mysql.h, the "buffer" variable is a "void*".  There is no need to change, as the variable is automatically cast to the correct type, but maybe create a ticket to correct this in the code?

Investigate if casting to a void* would be the more proper approach.

Subtickets

Change History (1)

comment:1 Changed 2 years ago by tomek

  • Milestone changed from DHCP Outstanding Tasks to Outstanding Tasks

Milestone renamed

Note: See TracTickets for help on using tickets.