if ((e = strrchr(buf, '\r')))
*e = 0;
- passwd = (char *) calloc(sizeof(char), strlen(buf) + 1);
+ passwd = static_cast<char *>(calloc(strlen(buf) + 1, sizeof(char)));
if (!passwd) {
fprintf(stderr, PROGRAM_NAME " ERROR: can not allocate memory\n");
exit(EXIT_FAILURE);
#define NMAS_LDAP_EXT_VERSION 1
-#define SMB_MALLOC_ARRAY(type, nelem) calloc(sizeof(type), nelem)
+#define SMB_MALLOC_ARRAY(type, nelem) calloc(nelem, sizeof(type))
#define DEBUG(level, args)
/**********************************************************************
typedef ValueType Value; ///< id storage type
InstanceId() {change();}
+ InstanceId(InstanceId &&) = delete; // no copying/moving of any kind
operator Value() const { return value; }
bool operator ==(const InstanceId &o) const { return value == o.value; }
public:
Value value = Value(); ///< instance identifier
-
-private:
- InstanceId(const InstanceId &); ///< not implemented; IDs are unique
- InstanceId& operator=(const InstanceId &); ///< not implemented
};
/// An InstanceIdDefinitions() helper. Avoid direct use.