aboutsummaryrefslogtreecommitdiff
path: root/remote_plot.c
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-04-30 03:15:55 -0700
committerXiao Pan <xyz@flylightning.xyz>2025-04-30 03:15:55 -0700
commitc7828b38c2dffc7bb31afba5b0f263addd6c0cf3 (patch)
tree5afb6028f896d60959ee8180dc7e9702530e19ef /remote_plot.c
parent14f4b52058e21f712ea0140b1a5d663bea335d7c (diff)
less messy, consider C operator precedence, see `man operator`
Diffstat (limited to 'remote_plot.c')
-rw-r--r--remote_plot.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/remote_plot.c b/remote_plot.c
index a54bc08..89000ce 100644
--- a/remote_plot.c
+++ b/remote_plot.c
@@ -232,7 +232,7 @@ static gboolean read_data(gpointer user_data)
return G_SOURCE_REMOVE;
}
- if(AddItem(temp,&(data->cans))==false)
+ if(AddItem(temp,&data->cans)==false)
{
fprintf(stderr,"Problem allocating memory\n");
//exit(1);
@@ -308,7 +308,7 @@ static gboolean read_data(gpointer user_data)
temp.temp[j]=atof(strtok(NULL,","));
temp.temp[TEMPLEN-1]=atof(strtok(NULL,"\n"));
//printf("before AddItem\n");
- if(AddItem(temp,&(data->cans))==false)
+ if(AddItem(temp,&data->cans)==false)
{
fprintf(stderr,"Problem allocating memory\n");
return G_SOURCE_REMOVE;
@@ -716,7 +716,7 @@ static int command_line (GApplication *app, GApplicationCommandLine *cmdline, gp
// https://docs.gtk.org/glib/gvariant-format-strings.html#pointers
// &s copy the pointer
g_variant_dict_lookup (options, "destination", "&s", &dest);
- g_variant_dict_lookup (options, "local", "b", &(data->local));
+ g_variant_dict_lookup (options, "local", "b", &data->local);
if(!(data->local))
{
@@ -810,8 +810,8 @@ int main (int argc, char **argv)
sprintf(data.filename,"%s%s",dir,str);
}
- InitializeList(&(data.cans));
- if(ListIsFull(&(data.cans)))
+ InitializeList(&data.cans);
+ if(ListIsFull(&data.cans))
{
fprintf(stderr,"No memory available! Bye!\n");
exit(1);
@@ -846,7 +846,7 @@ int main (int argc, char **argv)
// Segmentation fault (core dumped) error, why? maybe double free? so no free is ok?
//sftp_free(sftp);
- EmptyTheList(&(data.cans));
+ EmptyTheList(&data.cans);
free(data.filename);