summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-03-05 14:40:49 +0000
committerVincent Sanders <vince@kyllikki.org>2017-03-05 14:40:49 +0000
commite190cdf926a7ff4071053f8507e489cb8da63b13 (patch)
tree738d7c047a5d5fdfe141b3696e3878d4c45b76e8
parent3217c82cdb4348960dfbdd978c68721f268fd385 (diff)
downloadnetsurf-e190cdf926a7ff4071053f8507e489cb8da63b13.tar.gz
netsurf-e190cdf926a7ff4071053f8507e489cb8da63b13.tar.bz2
fix uninitialised variable usage in atari ssl viewer
cppcheck identified uninitialised variable usage error
-rw-r--r--frontends/atari/verify_ssl.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/frontends/atari/verify_ssl.c b/frontends/atari/verify_ssl.c
index 055fd3057..33136eebd 100644
--- a/frontends/atari/verify_ssl.c
+++ b/frontends/atari/verify_ssl.c
@@ -182,8 +182,10 @@ static void do_popup( WINDOW *win, int index, int mode, void *data)
-bool verify_ssl_form_do( const char * url, const struct ssl_cert_info * cert_infos_n ,
- unsigned long num_certs )
+bool
+verify_ssl_form_do(const char * url,
+ const struct ssl_cert_info * cert_infos_n,
+ unsigned long num_certs)
{
OBJECT *tree;
WINDOW * form;
@@ -191,6 +193,13 @@ bool verify_ssl_form_do( const char * url, const struct ssl_cert_info * cert_inf
bool bres = false;
bool cont = true;
int res = 0;
+
+ RsrcGaddr (h_gem_rsrc , R_TREE, VERIFY, &tree);
+ ObjcString( tree, VERIFY_LBL_HOST, (char*)url );
+ ObjcChange( OC_OBJC, tree, VERIFY_BT_ACCEPT, 0, 0 );
+ ObjcChange( OC_OBJC, tree, VERIFY_BT_REJECT, 0, 0 );
+ form = FormWindBegin( tree, (char*)"SSL Verify failed" );
+
dp.cert_infos_n = (struct ssl_cert_info *)cert_infos_n;
dp.num_certs = num_certs;
dp.scrollx = 0;
@@ -199,12 +208,6 @@ bool verify_ssl_form_do( const char * url, const struct ssl_cert_info * cert_inf
dp.cols = cert_display_width( &dp.cert_infos_n[dp.current] );
dp.rows = 8;
dp.tree = tree;
-
- RsrcGaddr (h_gem_rsrc , R_TREE, VERIFY, &tree);
- ObjcString( tree, VERIFY_LBL_HOST, (char*)url );
- ObjcChange( OC_OBJC, tree, VERIFY_BT_ACCEPT, 0, 0 );
- ObjcChange( OC_OBJC, tree, VERIFY_BT_REJECT, 0, 0 );
- form = FormWindBegin( tree, (char*)"SSL Verify failed" );
EvntDataAdd( form, WM_REDRAW, cert_info_draw, (void*)&dp, EV_BOT );
/* this results in some extended objects which can not be freed: :( */
/* RsrcUserDraw( OC_FORM, tree, VERIFY_BOX_DETAILS, cert_info_draw,(void*)&dp ) ; */