]> git.proxmox.com Git - mirror_smartmontools-debian.git/blobdiff - utility.cpp
Fix upstream branch
[mirror_smartmontools-debian.git] / utility.cpp
index 17af257976a3724a83870e72582d79e468c3e56e..40fb2bdc09fc074da1a6a6863eb5dcb8ef1b2a5b 100644 (file)
@@ -3,13 +3,8 @@
  *
  * Home page of code is: http://www.smartmontools.org
  *
-<<<<<<< HEAD
  * Copyright (C) 2002-12 Bruce Allen
  * Copyright (C) 2008-16 Christian Franke
-=======
- * Copyright (C) 2002-12 Bruce Allen <smartmontools-support@lists.sourceforge.net>
- * Copyright (C) 2008-15 Christian Franke <smartmontools-support@lists.sourceforge.net>
->>>>>>> 3d8ad6fa4529eb02ae1391a1e937bf57aad3fb74
  * Copyright (C) 2000 Michael Cornwell <cornwell@acm.org>
  *
  * This program is free software; you can redistribute it and/or modify
 #include "atacmds.h"
 #include "dev_interface.h"
 
-<<<<<<< HEAD
 const char * utility_cpp_cvsid = "$Id: utility.cpp 4309 2016-04-24 14:59:15Z chrfranke $"
-=======
-const char * utility_cpp_cvsid = "$Id: utility.cpp 4031 2015-01-01 10:47:48Z chrfranke $"
->>>>>>> 3d8ad6fa4529eb02ae1391a1e937bf57aad3fb74
                                  UTILITY_H_CVSID INT64_H_CVSID;
 
 const char * packet_types[] = {
@@ -99,11 +90,7 @@ std::string format_version_info(const char * prog_name, bool full /*= false*/)
       "(build date " __DATE__ ")" // checkout without expansion of Id keywords
 #endif
       " [%s] " BUILD_INFO "\n"
-<<<<<<< HEAD
     "Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org\n",
-=======
-    "Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org\n",
->>>>>>> 3d8ad6fa4529eb02ae1391a1e937bf57aad3fb74
     prog_name, smi()->get_os_version_str().c_str()
   );
   if (!full)
@@ -637,56 +624,6 @@ int split_selective_arg(char *s, uint64_t *start,
   return 0;
 }
 
-<<<<<<< HEAD
-=======
-#ifdef OLD_INTERFACE
-
-int64_t bytes = 0;
-
-// Helps debugging.  If the second argument is non-negative, then
-// decrement bytes by that amount.  Else decrement bytes by (one plus)
-// length of null terminated string.
-void *FreeNonZero(void *address, int size, int /*line*/, const char* /*file*/){
-  if (address) {
-    if (size<0)
-      bytes-=1+strlen((char*)address);
-    else
-      bytes-=size;
-    free(address);
-  }
-  return NULL;
-}
-
-// A custom version of strdup() that keeps track of how much memory is
-// being allocated. If mustexist is set, it also throws an error if we
-// try to duplicate a NULL string.
-char *CustomStrDup(const char *ptr, int mustexist, int /*whatline*/, const char* /*file*/){
-  char *tmp;
-
-  // report error if ptr is NULL and mustexist is set
-  if (ptr==NULL){
-    if (mustexist)
-      throw std::runtime_error("Internal error in CustomStrDup()");
-    else
-      return NULL;
-  }
-
-  // make a copy of the string...
-  tmp=strdup(ptr);
-  
-  if (!tmp)
-    throw std::bad_alloc();
-  
-  // and track memory usage
-  bytes+=1+strlen(ptr);
-  
-  return tmp;
-}
-
-#endif // OLD_INTERFACE
-
-
->>>>>>> 3d8ad6fa4529eb02ae1391a1e937bf57aad3fb74
 // Returns true if region of memory contains non-zero entries
 bool nonempty(const void * data, int size)
 {