mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-05-31 16:21:13 +03:00
examples: Enable strict build
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
parent
9e7de14d59
commit
4b85934198
@ -324,8 +324,8 @@ int main(int argc, char *argv[])
|
|||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
if (errno == EEXIST) {
|
if (errno == EEXIST) {
|
||||||
printf("File \"%s\" exists. Overwrite it? (y|n) ", arguments.file);
|
printf("File \"%s\" exists. Overwrite it? (y|n) ", arguments.file);
|
||||||
scanf("%1023s", overwrite);
|
rc = scanf("%1023s", overwrite);
|
||||||
if (tolower(overwrite[0]) == 'y') {
|
if (rc > 0 && tolower(overwrite[0]) == 'y') {
|
||||||
rc = open(arguments.file, O_WRONLY);
|
rc = open(arguments.file, O_WRONLY);
|
||||||
if (rc > 0) {
|
if (rc > 0) {
|
||||||
close(rc);
|
close(rc);
|
||||||
@ -395,8 +395,8 @@ int main(int argc, char *argv[])
|
|||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
if (errno == EEXIST) {
|
if (errno == EEXIST) {
|
||||||
printf("File \"%s\" exists. Overwrite it? (y|n) ", pubkey_file);
|
printf("File \"%s\" exists. Overwrite it? (y|n) ", pubkey_file);
|
||||||
scanf("%1023s", overwrite);
|
rc = scanf("%1023s", overwrite);
|
||||||
if (tolower(overwrite[0]) == 'y') {
|
if (rc > 0 && tolower(overwrite[0]) == 'y') {
|
||||||
rc = open(pubkey_file, O_WRONLY);
|
rc = open(pubkey_file, O_WRONLY);
|
||||||
if (rc > 0) {
|
if (rc > 0) {
|
||||||
close(rc);
|
close(rc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user