summaryrefslogtreecommitdiff
path: root/src/sm_manager.c
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2007-05-13 00:49:58 +0200
committerTilman Sauerbeck <tilman@code-monkey.de>2007-05-13 00:49:58 +0200
commit57ea148fdbf047a012b361acdc7954e70679dad3 (patch)
tree85b3686502ceb848c0779887fb98b540c06ec9f9 /src/sm_manager.c
parent8ba3325ed15154a933c064831abf8f412a5154a7 (diff)
Don't reinvent the wheel and just use strdup().
Diffstat (limited to 'src/sm_manager.c')
-rw-r--r--src/sm_manager.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/sm_manager.c b/src/sm_manager.c
index df9c221..57f53b5 100644
--- a/src/sm_manager.c
+++ b/src/sm_manager.c
@@ -73,10 +73,7 @@ _SmsProtocolSetupProc (IceConn iceConn,
if ((smsConn = (SmsConn) malloc (sizeof (struct _SmsConn))) == NULL)
{
- char *str = "Memory allocation failed";
-
- if ((*failureReasonRet = (char *) malloc (strlen (str) + 1)) != NULL)
- strcpy (*failureReasonRet, str);
+ *failureReasonRet = strdup ("Memory allocation failed");
return (0);
}