03/05/2017 15:44, Shahaf Shuler: > + printf("Invalid socket id, options are: "); > + for (i = 0; i < num_sockets; i++) { > + printf("%u%s", socket_ids[i], > + (i == num_sockets - 1) ? "\n" : ","); [...] > + printf("Invalid socket id, options are: "); > + for (i = 0; i < num_sockets; i++) { > + printf("%u%s", socket_ids[i], > + (i == num_sockets - 1) ? "\n" : ","); [...] > + printf("socket id options are: "); > + for (i = 0; i < num_sockets; i++) { > + printf("%u%s", socket_ids[i], > + (i == num_sockets - 1) ? > + "\n" : ",");
It is three times the same copy pasted code. Please make a function.