Skip to content

Commit

Permalink
linter error: run clang format
Browse files Browse the repository at this point in the history
Signed-off-by: Maryam Tahhan <[email protected]>
  • Loading branch information
maryamtahhan committed Oct 17, 2023
1 parent aa0121e commit cf93682
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ clangformat:
@echo
-clang-format -i -style=file internal/bpf/*.c internal/bpf/*.h
-clang-format -i -style=file internal/bpf/xdp-pass/*.c
-clang-format -i -style=file internal/bpf/xdp-afxdp-redirect/*.c
@echo
@echo

Expand Down
12 changes: 6 additions & 6 deletions internal/bpf/bpfWrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
* limitations under the License.
*/

#include <errno.h>
#include <fcntl.h>
#include <linux/if_link.h> // for XDP_FLAGS_DRV_MODE
#include <net/if.h> // for if_nametoindex
#include <sys/stat.h>
#include <unistd.h>
#include <xdp/libxdp.h>
#include <xdp/xsk.h> // for xsk_setup_xdp_prog, bpf_set_link_xdp_fd
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>

#include "bpfWrapper.h"
#include "log.h"
Expand Down Expand Up @@ -112,7 +112,7 @@ int Configure_busy_poll(int fd, int busy_timeout, int busy_budget) {
}

Log_Warning("%s: setsockopt failure, attempting to restore xsk to default state",
__FUNCTION__);
__FUNCTION__);

Log_Warning("%s: unsetting SO_BUSY_POLL on file descriptor %d", __FUNCTION__, fd);

Expand Down Expand Up @@ -191,7 +191,7 @@ int Load_attach_bpf_xdp_pass(char *ifname) {
}
Log_Info("%s: if_index for interface %s is %d", __FUNCTION__, ifname, ifindex);

if (access(filename, O_RDONLY) < 0) {
if (access(filename, O_RDONLY) < 0) {
Log_Error("%s:error accessing file %s: %s\n", __FUNCTION__, filename,
strerror(errno));
return err;
Expand Down

0 comments on commit cf93682

Please sign in to comment.