Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

added IP address retrieval #205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

added IP address retrieval #205

wants to merge 1 commit into from

Conversation

sherrychen127
Copy link
Contributor

No description provided.

@Vuwij
Copy link
Member

Vuwij commented Jun 29, 2019

This pull request introduces 1 alert when merging 41774c2 into fe061f4 - view on LGTM.com

new alerts:

  • 1 for Unused import

This project has automated code review enabled, but doesn't use the LGTM GitHub App. Migrate over by installing the app. Read about the benefits of migrating to GitHub Apps in the blog.


Comment posted by LGTM.com

@@ -763,6 +767,25 @@ void print_ip_address(char ip_address[]){


int main(){
int result = system("python ip_address.py 1");
int arraysize=14;
char ip[arraysize];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is 14 always going to be large enough for the IP address? Maybe std::string could work better here

int result = system("python ip_address.py 1");
int arraysize=14;
char ip[arraysize];
char current_char;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you using all these local variables? If not, you can remove them

@@ -763,6 +767,25 @@ void print_ip_address(char ip_address[]){


int main(){
int result = system("python ip_address.py 1");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the 1 need to be passed in here?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants