[gnutls-devel] GnuTLS | lib: improve external file loading (!1261)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Wed May 27 17:02:47 CEST 2020




Tim Rühsen started a new discussion on lib/cert-cred-rawpk.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1261#note_350154379

>  
>  	} else {
>  		/* Read our raw public-key into memory from file */
> -		rawpubkey.data = (void*) read_file(rawpkfile, RF_BINARY, &key_size);
> +		rawpubkey.data = (void*) read_file(rawpkfile,

`rawpubkey` is only used in this else block. Why not moving the variable declaration here to narrow the scope ? (yes, this change isn't directly related. but would be a good opportunity when touching the code.)

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1261#note_350154379
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20200527/bff89d6b/attachment-0001.html>


More information about the Gnutls-devel mailing list