aboutsummaryrefslogtreecommitdiff
path: root/src/my
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-26 10:05:04 +0000
committerChristian Grothoff <christian@grothoff.org>2016-05-26 10:05:04 +0000
commit732081dcd1eec1f10f7b9a0c8be2f10f73d84f68 (patch)
tree3a34d5f6af519ac9f832f6379d2c0c6c3b98f125 /src/my
parent33581f6d09c55f4848adf44fb2aa77674052de58 (diff)
downloadgnunet-732081dcd1eec1f10f7b9a0c8be2f10f73d84f68.tar.gz
gnunet-732081dcd1eec1f10f7b9a0c8be2f10f73d84f68.zip
-indent fixes
Diffstat (limited to 'src/my')
-rw-r--r--src/my/my.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/src/my/my.c b/src/my/my.c
index cc4f21cb1..886f0c6f6 100644
--- a/src/my/my.c
+++ b/src/my/my.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet 2 This file is part of GNUnet
3 Copyright (C) 2016 GNUnet e.V. 3 Copyright (C) 2016 Inria & GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
@@ -92,16 +92,17 @@ GNUNET_MY_exec_prepared (struct GNUNET_MYSQL_Context *mc,
92 return GNUNET_OK; 92 return GNUNET_OK;
93} 93}
94 94
95
95/** 96/**
96 * Extract results from a query result according 97 * Extract results from a query result according
97 * to the given specification. If colums are NULL, 98 * to the given specification. If colums are NULL,
98 * the destination is not modified, and #GNUNET_NO is returned 99 * the destination is not modified, and #GNUNET_NO is returned4
99 * 100 *
100 * 101 *
101 * @param result 102 * @param result
102 * @param row, the row from the result to extract 103 * @param row, the row from the result to extract
103 * @param result specificatio to extract for 104 * @param result specificatio to extract for
104 * @return 105 * @return
105 #GNUNET_YES if all results could be extracted 106 #GNUNET_YES if all results could be extracted
106 #GNUNET_NO if at least one result was NULL 107 #GNUNET_NO if at least one result was NULL
107 #GNUNET_SYSERR if a result was invalid 108 #GNUNET_SYSERR if a result was invalid
@@ -116,28 +117,29 @@ GNUNET_MY_extract_result (MYSQL_BIND * result,
116 int had_null = GNUNET_NO; 117 int had_null = GNUNET_NO;
117 int ret; 118 int ret;
118 119
119 for(i = 0 ; NULL != rs[i].conv ; i++) 120 for (i = 0 ; NULL != rs[i].conv ; i++)
120 { 121 {
121 struct GNUNET_MY_ResultSpec *spec; 122 struct GNUNET_MY_ResultSpec *spec;
122 123
123 spec = &rs[i]; 124 spec = &rs[i];
124 ret = spec->conv(spec->conv_cls, 125 ret = spec->conv (spec->conv_cls,
125 qp, 126 qp,
126 result); 127 result);
127 128
128 if(ret == GNUNET_SYSERR){ 129 if (GNUNET_SYSERR == ret)
130 {
129 //GNUNET_MY_cleanup_result(rs); 131 //GNUNET_MY_cleanup_result(rs);
130 return GNUNET_SYSERR; 132 return GNUNET_SYSERR;
131 } 133 }
132 134
133 if(spec->result_size != NULL) 135 if (NULL != spec->result_size)
134 *spec->result_size = spec->dst_size; 136 *spec->result_size = spec->dst_size;
135 } 137 }
136 138
137 if(GNUNET_YES == had_null) 139 if (GNUNET_YES == had_null)
138 return GNUNET_NO; 140 return GNUNET_NO;
139 141
140 return GNUNET_OK; 142 return GNUNET_OK;
141} 143}
142 144
143/* end of my.c */ \ No newline at end of file 145/* end of my.c */