remove pointless strdup_malloc
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Fri, 12 Mar 2010 00:04:22 +0000 (19:04 -0500)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Fri, 12 Mar 2010 00:04:22 +0000 (19:04 -0500)
libust/tracectl.c
libustcomm/ustcomm.c
libustcomm/ustcomm.h

index 882f81ab75f7a5a7fc00e2b5e5a072b783725483..064b72bd5fd9dc370654fb7c10873b8ef3c1ffd1 100644 (file)
@@ -707,14 +707,14 @@ static int do_cmd_put_subbuffer(const char *recvbuf, struct ustcomm_source *src)
 
        DBG("put_subbuf");
 
-       channel_and_cpu = strdup_malloc(nth_token(recvbuf, 1));
+       channel_and_cpu = strdup(nth_token(recvbuf, 1));
        if(channel_and_cpu == NULL) {
                ERR("cannot parse channel");
                retval = -1;
                goto end;
        }
 
-       consumed_old_str = strdup_malloc(nth_token(recvbuf, 2));
+       consumed_old_str = strdup(nth_token(recvbuf, 2));
        if(consumed_old_str == NULL) {
                ERR("cannot parse consumed_old");
                retval = -1;
index 5dfd2a8c946183649dd529f67057c3e3ef74c063..8324f21decad53d79a8659657bb2d000e90c914b 100644 (file)
@@ -86,20 +86,6 @@ static int mkdir_p(const char *path, mode_t mode)
        return retval;
 }
 
-char *strdup_malloc(const char *s)
-{
-       char *retval;
-
-       if(s == NULL)
-               return NULL;
-
-       retval = (char *) malloc(strlen(s)+1);
-
-       strcpy(retval, s);
-
-       return retval;
-}
-
 static int signal_process(pid_t pid)
 {
        return 0;
index 841d67872027786e7d6ec319ea4fed763568bee9..e7e73621dc4c74244dadd80c1870cf07cb9dbb7b 100644 (file)
@@ -65,8 +65,6 @@ struct ustcomm_multipoll_conn_info {
        int (*cb)(char *msg, struct ustcomm_source *src);
 };
 
-extern char *strdup_malloc(const char *s);
-
 //int send_message_pid(pid_t pid, const char *msg, char **reply);
 extern int ustcomm_request_consumer(pid_t pid, const char *channel);
 
This page took 0.028299 seconds and 4 git commands to generate.