diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-22 19:40:46 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-22 19:40:46 +0000 |
commit | 6326452f41e74675009120c7b9251bb2d7f8be0b (patch) | |
tree | 85a8323517e999345585d4d414dd536a73232b10 /url.c | |
parent | 19f5d6545131c95c8872b6be53659c2d557de500 (diff) | |
download | mpv-6326452f41e74675009120c7b9251bb2d7f8be0b.tar.bz2 mpv-6326452f41e74675009120c7b9251bb2d7f8be0b.tar.xz |
exit() -> return NULL
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1632 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'url.c')
-rw-r--r-- | url.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -23,7 +23,7 @@ url_new(char* url) { Curl = (URL_t*)malloc(sizeof(URL_t)); if( Curl==NULL ) { printf("Memory allocation failed!\n"); - exit(1); + return NULL; } // Initialisation of the URL container members memset( Curl, 0, sizeof(URL_t) ); @@ -32,7 +32,7 @@ url_new(char* url) { Curl->url = (char*)malloc(strlen(url)+1); if( Curl->url==NULL ) { printf("Memory allocation failed!\n"); - exit(1); + return NULL; } strcpy(Curl->url, url); @@ -71,7 +71,7 @@ url_new(char* url) { Curl->hostname = (char*)malloc(pos2-pos1-3+1); if( Curl->hostname==NULL ) { printf("Memory allocation failed!\n"); - exit(1); + return NULL; } strncpy(Curl->hostname, ptr1+3, pos2-pos1-3); Curl->hostname[pos2-pos1-3] = '\0'; @@ -86,7 +86,7 @@ url_new(char* url) { Curl->file = (char*)malloc(strlen(ptr2)+1); if( Curl->file==NULL ) { printf("Memory allocation failed!\n"); - exit(1); + return NULL; } strcpy(Curl->file, ptr2); } @@ -96,7 +96,7 @@ url_new(char* url) { Curl->file = (char*)malloc(2); if( Curl->file==NULL ) { printf("Memory allocation failed!\n"); - exit(1); + return NULL; } strcpy(Curl->file, "/"); } |