NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
misc/50754: src/sys/arch/epoc32/stand/e32boot/ldd/epoc32.cpp:62: shallow copy or deep copy ?
>Number: 50754
>Category: misc
>Synopsis: src/sys/arch/epoc32/stand/e32boot/ldd/epoc32.cpp:62: shallow copy or deep copy ?
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 03 09:50:00 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160203
>Organization:
>Environment:
>Description:
[src/sys/arch/epoc32/stand/e32boot/ldd/epoc32.cpp:62]: (style) Value of pointer 'cpu', which points to allocated memory, is copied in copy constructor instead of allocating new memory.
For objects with pointers to other objects, it is usual to prefer
deep copy to shallow copy.
I am not familiar with the code, this might be an exception.
Suggest compile the epoc32 code and see if the copy constructor is used anywhere. This might be unused code, so it doesn't matter anyway.
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index