2 Commits
Author SHA1 Message Date
Arjan van de Ven 02b6820a3d deal with two error cases 2022-08-30 14:30:34 +00:00
Patrick McCarty f563c9a475 Fix style issues detected with clang-format v14
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-08-30 02:53:29 +00:00
6 changed files with 10 additions and 8 deletions
+5 -3
View File
@@ -3,7 +3,7 @@
* All rights reserved
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted providing that the following conditions
* modification, are permitted providing that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@@ -445,7 +445,7 @@ int make_bsdiff_delta(char *old_filename, char *new_filename, char *delta_filena
memset(&small_header, 0, sizeof(struct header_v21));
memcpy(&small_header.magic, BSDIFF_HDR_FULLDL, 8);
efd = open(delta_filename, O_CREAT | O_EXCL | O_WRONLY, 00644);
efd = open(delta_filename_unique, O_CREAT | O_EXCL | O_WRONLY, 00644);
if (efd < 0) {
close(fd);
return -1;
@@ -462,6 +462,7 @@ int make_bsdiff_delta(char *old_filename, char *new_filename, char *delta_filena
}
fclose(pf);
close(fd);
rename(delta_filename_unique, delta_filename);
return 1;
}
@@ -527,7 +528,7 @@ int make_bsdiff_delta(char *old_filename, char *new_filename, char *delta_filena
memset(&small_header, 0, sizeof(struct header_v21));
memcpy(&small_header.magic, BSDIFF_HDR_FULLDL, 8);
efd = open(delta_filename, O_CREAT | O_EXCL | O_WRONLY, 00644);
efd = open(delta_filename_unique, O_CREAT | O_EXCL | O_WRONLY, 00644);
if (efd < 0) {
close(fd);
munmap(old_data, old_size);
@@ -553,6 +554,7 @@ int make_bsdiff_delta(char *old_filename, char *new_filename, char *delta_filena
close(fd);
munmap(old_data, old_size);
free(I);
rename(delta_filename_unique, delta_filename);
return 1;
}
+1 -1
View File
@@ -4,7 +4,7 @@
* Copyright © 2012-2016 Intel Corporation.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted providing that the following conditions
* modification, are permitted providing that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
+1 -1
View File
@@ -4,7 +4,7 @@
* Copyright © 2012-2016 Intel Corporation.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted providing that the following conditions
* modification, are permitted providing that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
+1 -1
View File
@@ -3,7 +3,7 @@
* All rights reserved
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted providing that the following conditions
* modification, are permitted providing that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
+1 -1
View File
@@ -4,7 +4,7 @@
* Copyright © 2012-2016 Intel Corporation.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted providing that the following conditions
* modification, are permitted providing that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
+1 -1
View File
@@ -3,7 +3,7 @@
* All rights reserved
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted providing that the following conditions
* modification, are permitted providing that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.