Commit 04b23da6 authored by Matteo Quintiliani's avatar Matteo Quintiliani

Fixed minor warnings


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@1339 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 14d72d1e
......@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it
*
* $Id: nmxp_data.c,v 1.72 2010-07-29 19:05:27 racine Exp $
* $Id: nmxp_data.c,v 1.73 2010-08-27 07:53:37 mtheo Exp $
*
*/
......@@ -704,7 +704,9 @@ int nmxp_data_dir_exists (char *dirname) {
ret = 1;
}
if(cur_dir) {
chdir(cur_dir);
if(chdir(cur_dir) == -1) {
/* ERROR */
}
NMXP_MEM_FREE(cur_dir);
}
}
......@@ -725,7 +727,9 @@ char *nmxp_data_dir_abspath (char *dirname) {
ret = nmxp_data_gnu_getcwd();
}
if(cur_dir) {
chdir(cur_dir);
if(chdir(cur_dir) == -1) {
/* ERROR */
}
NMXP_MEM_FREE(cur_dir);
}
}
......@@ -792,7 +796,9 @@ int nmxp_data_mkdirp(const char *filename) {
NMXP_MEM_FREE(dir);
if(cur_dir) {
chdir(cur_dir);
if(chdir(cur_dir) == -1) {
/* ERROR */
}
NMXP_MEM_FREE(cur_dir);
}
return error;
......
......@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it
*
* $Id: nmxptool.c,v 1.226 2010-08-27 06:57:06 mtheo Exp $
* $Id: nmxptool.c,v 1.227 2010-08-27 07:53:47 mtheo Exp $
*
*/
......@@ -159,7 +159,9 @@ int main (int argc, char **argv) {
int times_flow = 0;
int recv_errno = 0;
#ifdef HAVE_EARTHWORMOBJS
char *recv_errno_str;
#endif
char filename[500] = "";
char station_code[20] = "", channel_code[20] = "", network_code[20] = "";
......
......@@ -455,8 +455,8 @@ int nmxptool_ew_proc_configfile (char * configfile, NMXPTOOL_PARAMS *params) {
params->channels = (char *) NMXP_MEM_MALLOC(MAXSIZECHANNELSTRING);
strncpy(params->channels, str, MAXSIZECHANNELSTRING);
} else {
strncat(params->channels, ",", MAXSIZECHANNELSTRING);
strncat(params->channels, str, MAXSIZECHANNELSTRING);
strncat(params->channels, ",", MAXSIZECHANNELSTRING - strlen(params->channels));
strncat(params->channels, str, MAXSIZECHANNELSTRING - strlen(params->channels));
}
}
}
......
......@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it
*
* $Id: nmxptool_listen.c,v 1.10 2010-08-25 20:37:48 racine Exp $
* $Id: nmxptool_listen.c,v 1.11 2010-08-27 07:53:59 mtheo Exp $
*
*/
......@@ -306,7 +306,9 @@ void *nmxptool_p_man_sockfd(void *arg) {
/* TODO if error NMXP_MEM_FREE(fd_hc); */
pthread_mutex_unlock (&mutex_occ);
read(fd_hc->fd, command, MAX_LEN_COMMAND);
if(read(fd_hc->fd, command, MAX_LEN_COMMAND) == -1) {
/* ERROR */
}
if( (last_command = nmxptool_command(command)) != -1 ) {
last_str_command = nmxptool_command_clean(command);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment