comparison src/recpt1.c @ 154:578ebda88997

cosmetic changes.
author Naoya OYAMA <naoya.oyama@gmail.com>
date Sun, 02 Sep 2012 16:38:43 +0900
parents 30e91361506a
children 5d010d0ff6a1
comparison
equal deleted inserted replaced
153:e040d91c5cc7 154:578ebda88997
71 home = getenv("HOME"); 71 home = getenv("HOME");
72 snprintf(filename, PATH_MAX, "%s/.recpt1_%s", home, type); 72 snprintf(filename, PATH_MAX, "%s/.recpt1_%s", home, type);
73 f = fopen(filename, "r"); 73 f = fopen(filename, "r");
74 if(!f) { 74 if(!f) {
75 return channel_info_list; 75 return channel_info_list;
76 } 76 }
77 channel_info_list = malloc(sizeof(*channel_info_list)); 77 channel_info_list = malloc(sizeof(*channel_info_list));
78 if(!channel_info_list) 78 if(!channel_info_list)
79 return NULL; 79 return NULL;
80 channel_info_list->nr_channel = 0; 80 channel_info_list->nr_channel = 0;
81 while(1) { 81 while(1) {
101 101
102 p = strchr(buf, C_CHAR_COMMA); 102 p = strchr(buf, C_CHAR_COMMA);
103 if (p == NULL) { 103 if (p == NULL) {
104 /* FILE ERROR */ 104 /* FILE ERROR */
105 free(channel_info); 105 free(channel_info);
106 channel_info = NULL; 106 channel_info = NULL;
107 continue; 107 continue;
108 } 108 }
109 *p = '\0'; 109 *p = '\0';
110 channel_info->tp = ++p; 110 channel_info->tp = ++p;
111 111
112 p = strchr(p, C_CHAR_COMMA); 112 p = strchr(p, C_CHAR_COMMA);