Browse Source

Merge commit 'f94cff7' into cg_merges_20121203 (simply remove calloc_strcat)

Conflicts:
	miner.c
Luke Dashjr 13 years ago
parent
commit
32d9e702af
2 changed files with 0 additions and 22 deletions
  1. 0 21
      util.c
  2. 0 1
      util.h

+ 0 - 21
util.c

@@ -1463,27 +1463,6 @@ void dev_error(struct cgpu_info *dev, enum dev_reason reason)
 
 
 }
 }
 
 
-/* Calloc enough memory to fit string s, rounding up to 4 byte alignment */
-void *calloc_strcat(char *s)
-{
-	size_t len = strlen(s);
-	void *ptr = NULL;
-
-	if (!len)
-		goto out;
-
-	len += 1;
-	if (len % 4)
-		len += 4 - (len % 4);
-	ptr = calloc(len, 1);
-	if (unlikely(!ptr))
-		quit(1, "Failed to calloc ptr in calloc_str");
-
-	sprintf(ptr, "%s", s);
-out:
-	return ptr;
-}
-
 /* Realloc an existing string to fit an extra string s, appending s to it. */
 /* Realloc an existing string to fit an extra string s, appending s to it. */
 void *realloc_strcat(char *ptr, char *s)
 void *realloc_strcat(char *ptr, char *s)
 {
 {

+ 0 - 1
util.h

@@ -52,7 +52,6 @@ bool extract_sockaddr(struct pool *pool, char *url);
 bool auth_stratum(struct pool *pool);
 bool auth_stratum(struct pool *pool);
 bool initiate_stratum(struct pool *pool);
 bool initiate_stratum(struct pool *pool);
 void dev_error(struct cgpu_info *dev, enum dev_reason reason);
 void dev_error(struct cgpu_info *dev, enum dev_reason reason);
-void *calloc_strcat(char *s);
 void *realloc_strcat(char *ptr, char *s);
 void *realloc_strcat(char *ptr, char *s);
 
 
 #endif /* __UTIL_H__ */
 #endif /* __UTIL_H__ */